pub struct DecomposedTransform { /* private fields */ }
Expand description
Implementations§
Source§impl DecomposedTransform
impl DecomposedTransform
Sourcepub fn matrix(&self) -> [f64; 6]
pub fn matrix(&self) -> [f64; 6]
Convert decomposed form to 2x3 matrix form.
The first two values are x,y x-basis vector, the second 2 values are x,y y-basis vector, and the third 2 are translation.
In augmented matrix
form, if this method returns [a, b, c, d, e, f]
that is taken as:
| a c e |
| b d f |
| 0 0 1 |
References:
- FontTools Python implementation https://github.com/fonttools/fonttools/blob/5e6b12d12fa08abafbeb7570f47707fbedf69a45/Lib/fontTools/misc/transform.py#L484-L500
- Wikipedia affine transformation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecomposedTransform
impl RefUnwindSafe for DecomposedTransform
impl Send for DecomposedTransform
impl Sync for DecomposedTransform
impl Unpin for DecomposedTransform
impl UnwindSafe for DecomposedTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more