Skip to content

fontlab_pens.transform.Transform

Transform

2x2 matrix plus offset; every operation returns a new instance.

Source bases

  • NamedTuple (not resolved from selected source)

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__bool__ function (self) -> bool True unless this is the identity transformation.
__repr__ function (self) -> str
dx attribute float
dy attribute float
inverse function (self) -> Transform Return the inverse transformation (ZeroDivisionError if singular).
reverseTransform function (self, other: Sequence[float]) -> Transform Return this transformation applied first, then other.
rotate function (self, angle: float) -> Transform Return this transformation rotated by angle radians.
scale function (self, x: float=1, y: float | None=None) -> Transform Return this transformation scaled by x, y (y defaults to x).
skew function (self, x: float=0, y: float=0) -> Transform Return this transformation skewed by x and y radians.
toPS function (self) -> str Return the PostScript matrix representation, e.g.
transform function (self, other: Sequence[float]) -> Transform Return other applied first, then this transformation.
transformPoint function (self, p: Point) -> Point Return p transformed.
transformPoints function (self, points: Iterable[Point]) -> list[Point] Return a list of transformed points.
transformVector function (self, v: Point) -> Point Transform an (dx, dy) vector, ignoring the offset.
transformVectors function (self, vectors: Iterable[Point]) -> list[Point] Transform (dx, dy) vectors, ignoring the offset.
translate function (self, x: float=0, y: float=0) -> Transform Return this transformation offset by x, y.
xx attribute float
xy attribute float
yx attribute float
yy attribute float