DrawRectangleAdapter class

Inheritance

Constructors

DrawRectangleAdapter({double width = 1.0, double hitboxExtent = 5.0, bool debugHitboxes = false})
const

Properties

debugHitboxes bool
Render the areas that would cause that object to be selected.
final
hashCode int
The hash code for this object.
no setterinherited
hitboxExtent double
Half the width of the hitboxes.
final
panScaleEnabled bool
Whether the canvas should pan and scale in response to touch events.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectEnabled bool
Whether the canvas should attempt to select objects in response to touch events.
no setterinherited
typeId String
The unique identifier of this.
no setteroverride
width double
The width of each line.
final

Methods

cancelSelect(DrawRectangle object) → void
The object is no longer being selected. It should no longer render its hitbox and interactive handles.
override
end(DrawRectangle object, Color color, Size size) bool
Returning true will keep the object, false will discard it.
override
fromJSON(Map encoded) → DrawRectangle
Creates an instance of DrawObject from a JSON object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
querySelect(DrawRectangle object, Offset focalPoint, Matrix4 transform, Size size) bool
Returning true will select the object.
override
select(DrawRectangle object) → void
The object has been chosen as the selected object. It should render its hitbox and interactive handles, if any.
override
selectedEnd(DrawRectangle object) bool
Returning false will cancel the selection of the object.
override
selectedStart(DrawRectangle object, Offset focalPoint, Matrix4 transform, Size size) bool
Returning false will cancel the selection of the object, in which case selectedUpdate() and selectedEnd() will not be called for the same interaction.
override
selectedUpdate(DrawRectangle object, Offset focalPoint, Matrix4 transform, Size size) bool
Returning true will trigger a re-paint.
override
selectUpdateColor(DrawRectangle object, Color color) → void
Triggered by a change in color when an object is selected.
override
start(BuildContext context, Offset focalPoint, Color color, Matrix4 transform, Size size) FutureOr<DrawRectangle?>
Returning null will discard the object.
override
toString() String
A string representation of this object.
inherited
update(DrawRectangle object, Offset focalPoint, Color color, Matrix4 transform, Size size) bool
Returning true will trigger a re-paint.
override

Operators

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