Represents the rotation component of the transform.
Copies all properties defined by the prototype of Transform2D from other to this instance.
Clones this instance and returns a new Transform2D with identical values.
Computes the inverse of this transform and returns a copy.
Determines if both transforms are equal.
Transforms a size by the 2D transform. This is similar to Transform2D.transformPoint but doesn't account for translation as sizes aren't affected by translations.
StaticinverseComputes the inverse of the 2D transform.
StaticisDetermines if both transforms are equal.
StatictoGets the transformation matrix for the transform.
StatictransformStatictransformStatictransformTransforms a size by the 2D transform. This is similar to Transform2D.transformPoint but doesn't account for translation as sizes aren't affected by translations.
The 2D transform to be applied.
The size to be transformed.
StaticwithCreates a new 2D transform by decomposing the given 2D matrix transform.
. The Transform2D contains information about 2D object's position, rotation and scale. The class follows the 'copy-on-write' pattern, which means that every operation returns a copy of the transform with updated values. It also implies that the values of the transform cannot be directly modified.
The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.