pub struct Transformation(/* private fields */);Expand description
A 2D transformation matrix.
Implementations§
Source§impl Transformation
 
impl Transformation
Sourcepub const IDENTITY: Self
 
pub const IDENTITY: Self
A Transformation that preserves whatever is transformed.
Sourcepub fn orthographic(width: u32, height: u32) -> Self
 
pub fn orthographic(width: u32, height: u32) -> Self
Creates an orthographic projection.
Sourcepub fn inverse(self) -> Self
 
pub fn inverse(self) -> Self
Returns the inverse of the Transformation.
Sourcepub fn scale_factor(&self) -> f32
 
pub fn scale_factor(&self) -> f32
Returns the scale factor of the Transformation.
Sourcepub fn translation(&self) -> Vector
 
pub fn translation(&self) -> Vector
Returns the translation of the Transformation.
Trait Implementations§
Source§impl Clone for Transformation
 
impl Clone for Transformation
Source§fn clone(&self) -> Transformation
 
fn clone(&self) -> Transformation
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 Transformation
 
impl Debug for Transformation
Source§impl Default for Transformation
 
impl Default for Transformation
Source§impl From<Transformation> for Mat4
 
impl From<Transformation> for Mat4
Source§fn from(transformation: Transformation) -> Self
 
fn from(transformation: Transformation) -> Self
Converts to this type from the input type.
Source§impl Mul<Transformation> for Click
 
impl Mul<Transformation> for Click
Source§impl Mul<Transformation> for Cursor
 
impl Mul<Transformation> for Cursor
Source§impl Mul<Transformation> for Point
 
impl Mul<Transformation> for Point
Source§impl Mul<Transformation> for Rectangle
 
impl Mul<Transformation> for Rectangle
Source§impl Mul<Transformation> for Size
 
impl Mul<Transformation> for Size
Source§impl Mul<Transformation> for Vector
 
impl Mul<Transformation> for Vector
Source§impl Mul for Transformation
 
impl Mul for Transformation
Source§impl PartialEq for Transformation
 
impl PartialEq for Transformation
impl Copy for Transformation
impl StructuralPartialEq for Transformation
Auto Trait Implementations§
impl Freeze for Transformation
impl RefUnwindSafe for Transformation
impl Send for Transformation
impl Sync for Transformation
impl Unpin for Transformation
impl UnwindSafe for Transformation
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