rotationDeg property
double
get
rotationDeg
Derived rotation in degrees.
Note: for general affine transforms (shear), a unique decomposition into rotation+scale is not well-defined. This getter assumes a rotation+scale form and is intended as a convenience accessor.
Implementation
double get rotationDeg {
final a = transform.a;
final b = transform.b;
if (a == 0 && b == 0) return 0;
return math.atan2(b, a) * 180.0 / math.pi;
}
set
rotationDeg
(double value)
Implementation
set rotationDeg(double value) {
transform = Transform2D.trs(
translation: position,
rotationDeg: value,
scaleX: scaleX,
scaleY: scaleY,
);
}