Struct tiny_skia::Transform [−][src]
pub struct Transform {
pub sx: f32,
pub kx: f32,
pub ky: f32,
pub sy: f32,
pub tx: f32,
pub ty: f32,
}
Expand description
An affine transformation matrix.
Stores scale, skew and transform coordinates and a type of a transform.
Fields
sx: f32
kx: f32
ky: f32
sy: f32
tx: f32
ty: f32
Implementations
Creates a new Transform
.
We are using column-major-column-vector matrix notation, therefore it’s ky-kx, not kx-ky.
Creates a new translating Transform
.
Creates a new scaling Transform
.
Creates a new rotating Transform
.
Creates a new rotating Transform
at the specified position.
Checks that transform is identity.
The transform type is detected on creation, so this method is essentially free.
Checks that transform is scale-only.
The transform type is detected on creation, so this method is essentially free.
Checks that transform is skew-only.
The transform type is detected on creation, so this method is essentially free.
Checks that transform is translate-only.
The transform type is detected on creation, so this method is essentially free.
Checks that transform contains only scale and translate.
The transform type is detected on creation, so this method is essentially free.
Checks that transform contains a scale part.
The transform type is detected on creation, so this method is essentially free.
Checks that transform contains a skew part.
The transform type is detected on creation, so this method is essentially free.
Checks that transform contains a translate part.
The transform type is detected on creation, so this method is essentially free.
Post-scales the current transform.
Pre-translates the current transform.
Post-translates the current transform.
Pre-concats the current transform.
Post-concats the current transform.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl UnwindSafe for Transform
Blanket Implementations
Mutably borrows from an owned value. Read more