Shape class sealed

The geometry drawn or hit-tested for a node, in its own local space.

Implementers

Constructors

Shape.circle(double radius)
factory
Shape.rectangle(Vector2 size)
factory
Shape.square(double size)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
height → double
The height of the AABB that fully contains this shape.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Vector2
This shape's size, if fully contained by an AABB.
no setter
width → double
The width of the AABB that fully contains this shape.
no setter

Methods

clip(Canvas canvas) → void
Clips canvas to this shape.
draw(Canvas canvas, Paint paint) → void
Draws this shape onto canvas with paint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rect() → Rect
This shape's bounds at the origin.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

none → const Shape
No shape: an empty rectangle.