pub struct AffineMatrix2D {
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
pub e: f64,
pub f: f64,
}Expand description
2D affine transformation matrix [a, b, c, d, e, f] Represents: x’ = ax + by + e, y’ = cx + dy + f
Fields§
§a: f64Scale/rotation X component
b: f64Shear/rotation X component
c: f64Shear/rotation Y component
d: f64Scale/rotation Y component
e: f64Translation X component
f: f64Translation Y component
Implementations§
Source§impl AffineMatrix2D
impl AffineMatrix2D
Sourcepub const fn translation(dx: f64, dy: f64) -> Self
pub const fn translation(dx: f64, dy: f64) -> Self
Create translation matrix
Trait Implementations§
Source§impl Clone for AffineMatrix2D
impl Clone for AffineMatrix2D
Source§fn clone(&self) -> AffineMatrix2D
fn clone(&self) -> AffineMatrix2D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AffineMatrix2D
impl Debug for AffineMatrix2D
impl Copy for AffineMatrix2D
Auto Trait Implementations§
impl Freeze for AffineMatrix2D
impl RefUnwindSafe for AffineMatrix2D
impl Send for AffineMatrix2D
impl Sync for AffineMatrix2D
impl Unpin for AffineMatrix2D
impl UnsafeUnpin for AffineMatrix2D
impl UnwindSafe for AffineMatrix2D
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