TextRenderable class

A renderable text label

Inheritance

Constructors

TextRenderable({required String text, TextStyle? textStyle, TextAlign textAlign = TextAlign.center, Vector3? position, double rotation = 0.0, Vector3? scale, int layer = 0, int zOrder = 0, bool visible = true, double opacity = 1.0})
Create a text renderable

Properties

hashCode → int
The hash code for this object.
no setterinherited
layer ↔ int
Layer index for rendering order (lower layers render first)
getter/setter pairinherited
opacity ↔ double
Opacity (0.0 to 1.0)
getter/setter pairinherited
position ↔ Vector3
Position in world space (x, y used by 2-D Canvas; z reserved for 3-D).
getter/setter pairinherited
rotation ↔ double
Rotation in radians (Z-axis; standard 2-D rotation).
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale ↔ Vector3
Scale factors (x, y used by 2-D Canvas; z reserved for 3-D).
getter/setter pairinherited
text ↔ String
Text to display
getter/setter pair
textAlign ↔ TextAlign
Text alignment
getter/setter pair
textStyle ↔ TextStyle
Text style
getter/setter pair
tint ↔ Color?
Tint color
getter/setter pairinherited
visible ↔ bool
Visibility flag
getter/setter pairinherited
zOrder ↔ int
Z-order within the layer
getter/setter pairinherited

Methods

applyTransform(Canvas canvas) → void
Apply transform to canvas (projects 3-D position to 2-D XY plane).
inherited
getBounds() → Rect?
Get the bounding box of this renderable
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, Size canvasSize) → void
Render this object
override
restoreTransform(Canvas canvas) → void
Restore canvas state
inherited
toString() → String
A string representation of this object.
inherited

Operators

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