pub struct Affine2D {
pub a: f32,
pub b: f32,
pub c: f32,
pub d: f32,
pub tx: f32,
pub ty: f32,
}Expand description
A 2D affine transformation matrix (3×2).
Stored as [a, b, c, d, tx, ty] representing:
| a b tx |
| c d ty |
| 0 0 1 |Fields§
§a: f32Scale/rotation element (0,0).
b: f32Scale/rotation element (0,1).
c: f32Scale/rotation element (1,0).
d: f32Scale/rotation element (1,1).
tx: f32Translation X.
ty: f32Translation Y.
Implementations§
Trait Implementations§
impl Copy for Affine2D
impl StructuralPartialEq for Affine2D
Auto Trait Implementations§
impl Freeze for Affine2D
impl RefUnwindSafe for Affine2D
impl Send for Affine2D
impl Sync for Affine2D
impl Unpin for Affine2D
impl UnsafeUnpin for Affine2D
impl UnwindSafe for Affine2D
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