|
tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
|
2D affine transformation: [sx kx tx; ky sy ty; 0 0 1]. More...
#include <tiny_skia/Transform.h>
Public Member Functions | |
| std::optional< Transform > | invert () const |
| Returns the inverse, or nullopt if singular. | |
| Transform | preConcat (const Transform &other) const |
| Returns this * other (other applied first). | |
| Transform | postConcat (const Transform &other) const |
| Returns other * this (this applied first). | |
| void | mapPoints (std::span< Point > points) const |
| Transforms an array of points in-place. | |
Static Public Member Functions | |
| static constexpr Transform | fromRow (float sx, float ky, float kx, float sy, float tx, float ty) |
| Creates from all 6 matrix entries (row-major: sx, ky, kx, sy, tx, ty). | |
Supports translate, scale, skew. Use fromTranslate/fromScale for common cases, fromRow for arbitrary matrices. Compose with preConcat/postConcat.