RSTransform class Null safety
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.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- scos → double
-
The cosine of the rotation multiplied by the scale factor.
read-only
- ssin → double
-
The sine of the rotation multiplied by that same scale factor.
read-only
- 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.
read-only
- 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.
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited