pub struct Transform {
pub a: f32,
pub b: f32,
pub c: f32,
pub d: f32,
pub e: f32,
pub f: f32,
}
Expand description
An affine transform.
Fields§
§a: f32
The ‘a’ component of the transform.
b: f32
The ‘b’ component of the transform.
c: f32
The ‘c’ component of the transform.
d: f32
The ‘d’ component of the transform.
e: f32
The ‘e’ component of the transform.
f: f32
The ‘f’ component of the transform.
Implementations§
Source§impl Transform
impl Transform
Sourcepub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Self
pub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Self
Creates a new transform with the specified components.
Sourcepub fn new_translate(tx: f32, ty: f32) -> Self
pub fn new_translate(tx: f32, ty: f32) -> Self
Creates a new translation transform.
Sourcepub fn new_rotate(angle: f32) -> Self
pub fn new_rotate(angle: f32) -> Self
Creates a new rotation transform.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Checks whether a transform is the identity transform.
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
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