pub struct Matrix { /* private fields */ }
Expand description
An Matrix holds an affine transformation, usually used to reshape glyphs.
A small set of matrix operations are provided to manipulate these.
Implementations§
Source§impl Matrix
impl Matrix
Sourcepub fn rotate(&mut self, cos: f64, sin: f64)
pub fn rotate(&mut self, cos: f64, sin: f64)
Rotate a matrix
Rotates matrix by the angle who’s sine is sin and cosine is cos.
This is done by multiplying by the matrix:
Sourcepub fn scale(&mut self, sx: f64, dy: f64)
pub fn scale(&mut self, sx: f64, dy: f64)
Scale a matrix
Multiplies matrix x values by sx and y values by dy.
This is done by multiplying by the matrix:
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Matrix
impl RefUnwindSafe for Matrix
impl Send for Matrix
impl Sync for Matrix
impl Unpin for Matrix
impl UnwindSafe for Matrix
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