GroupElement class
The vector element that groups elements together.
This element proves useful because of its ability to transform group of elements as if they were a single one.
The available transforms are translations (translateX and translateY), scaling (scaleX and scaleY) and rotations.
To control the reference point of these transformations pivotX and pivotY can be modified. By default transforms use the top left corner as the center point.
All of these parameters can be animated through this element properties.
- Inheritance
-
- Object
- VectorElement<
GroupAnimationProperties> - GroupElement
Constructors
- GroupElement({double translateX = 0.0, double translateY = 0.0, double scaleX = 1.0, double scaleY = 1.0, double pivotX = 0.0, double pivotY = 0.0, double rotation = 0.0, GroupAnimationProperties properties = const GroupAnimationProperties(), VectorElements elements = const []})
-
Constructs a new instance of GroupElement.
const
Properties
- elements → VectorElements
-
The children of this element.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- pivotX → double
-
The horizontal coordinate of the pivot point. Defaults to 0.0.
final
- pivotY → double
-
The vertical coordinate of the pivot point. Defaults to 0.0.
final
- properties → GroupAnimationProperties
-
Animation properties for this element.
finalinherited
- rotation → double
-
The rotation to apply to this group, expressed in degrees. Defaults to 0.0.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleX → double
-
The horizontal scale of this group. Defaults to 1.0.
final
- scaleY → double
-
The vertical scale of this group. Defaults to 1.0.
final
- translateX → double
-
The horizontal translation of this group. Defaults to 0.0.
final
- translateY → double
-
The vertical translation of this group. Defaults to 0.0.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas, Size size, double progress, Duration duration, Matrix4 transform) → void -
Paint this vector element onto a Canvas.
The first two parameters behave the exact same way as CustomPainter.paint.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override