Two dimensional immutable vector.
Affine(x, y)
-
static identity()
- Return the identity transform.
-
static rotation()
- Create a rotation transform at the specified angle, optionally about the specified anchor point.
-
static scale()
- Create a scaling transform from a scalar or vector, optionally about an anchor point.
-
static shear()
- Create a shear transform from a vector, optionally about an anchor point.
-
static translation()
- Create a translation transform from an offset vector.
-
almost_equals
- Compare transforms for approximate equality.
-
column_vectors
- The values of the transform as three 2D column vectors
-
determinant
- The determinant of the transform matrix. This value is equal to the area scaling factor when the transform is applied to a shape.
-
is_conformal
- True if the transform is conformal, i.e., if angles between points are preserved after applying the transform, within rounding limits. This implies that the transform has no effective shear.
-
is_degenerate
- True if this transform is degenerate, which means that it will collapse a shape to an effective area of zero. Degenerate transforms cannot be inverted.
-
is_identity
- True if this transform equals the identity matrix, within rounding limits.
-
is_orthonormal
- True if the transform is orthonormal, which means that thetransform represents a rigid motion, which has no effective scaling orshear. Mathematically, this means that the axis vectors of thetransform matrix are perpendicular and unit-length. Applying anorthonormal transform to a shape always results in a congruent shape.
-
is_rectilinear
- True if the transform is rectilinear, i.e., whether a shape would remain axis-aligned, within rounding limits, after applying the transform.
-
itransform
- Transform a sequence of points or vectors in place.