RSTransform class
A transform consisting of a translation, a rotation, and a uniform scale.
Used by Canvas.drawAtlas. This is a more efficient way to represent these simple transformations than a full matrix.
Constructors
- RSTransform(double scos, double ssin, double tx, double ty)
- Creates an RSTransform.
- RSTransform.fromComponents({required double rotation, required double scale, required double anchorX, required double anchorY, required double translateX, required double translateY})
-
Creates an RSTransform from its individual components.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scos → double
-
The cosine of the rotation multiplied by the scale factor.
no setter
- ssin → double
-
The sine of the rotation multiplied by that same scale factor.
no setter
- tx → double
-
The x coordinate of the translation, minus scos multiplied by the
x-coordinate of the rotation point, plus ssin multiplied by the
y-coordinate of the rotation point.
no setter
- ty → double
-
The y coordinate of the translation, minus ssin multiplied by the
x-coordinate of the rotation point, minus scos multiplied by the
y-coordinate of the rotation point.
no setter
Methods
-
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