ObjectDrawable class abstract

An abstract drawable that can be moved and rotated and scaled.

Inheritance
Implementers

Constructors

ObjectDrawable({required Offset position, double rotationAngle = 0, double scale = 1, Set<ObjectDrawableAssist> assists = const <ObjectDrawableAssist>{}, Map<ObjectDrawableAssist, Paint> assistPaints = const <ObjectDrawableAssist, Paint>{}, bool locked = false, bool hidden = false})
Default constructor for ObjectDrawable.
const

Properties

assistPaints Map<ObjectDrawableAssist, Paint>
The paint to be used for each assist type.
final
assists Set<ObjectDrawableAssist>
The current assist lines the object has.
final
hashCode int
The hash code for this object.
no setterinherited
hidden bool
Whether the drawable is hidden or not.
finalinherited
isHidden bool
no setterinherited
isNotHidden bool
no setterinherited
locked bool
Defines if the object drawable is locked or not. If it is locked, it won't be movable, scalable or re-sizable using the UI.
final
min_scale double
no setter
position Offset
The location of the object to be painted.
final
rotationAngle double
The rotation of the object to be painted in radians.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
The scale of the object to be painted.
final

Methods

copyWith({bool? hidden, Set<ObjectDrawableAssist>? assists, Offset? position, double? rotation, double? scale, bool? locked}) ObjectDrawable
Compares two ObjectDrawables for equality. Creates a copy of this but with the given fields replaced with the new values.
draw(Canvas canvas, Size size) → void
Draws the object on the provided canvas of size size.
override
drawAssists(Canvas canvas, Size size) → void
Draws any assist lines that the object has on canvas with size.
drawObject(Canvas canvas, Size size) → void
Abstract method to draw the object.
getSize({double minWidth = 0.0, double maxWidth = double.infinity}) Size
Abstract method to get the size of the rendered object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

defaultAssistPaint Paint
Default paint used for horizontal and vertical assist lines.
final
defaultRotationAssistPaint Paint
Default paint used for rotational assist lines.
final

Constants

minScale → const double
The smallest value for the scale of an object drawable.