pub struct AffineTransform {
pub ux: f32,
pub uy: f32,
pub vx: f32,
pub vy: f32,
pub tx: f32,
pub ty: f32,
}
Expand description
2D transformation that preserves parallel lines.
Such a transformation can combine translation, scale, flip, rotate and shears. It is represented by a 3 by 3 matrix where the last row is [0, 0, 1].
[ x' ] [ u.x v.x t.x ] [ x ]
[ y' ] = [ u.y v.y t.y ] [ y ]
[ 1 ] [ 0 0 1 ] [ 1 ]
Fields§
§ux: f32
§uy: f32
§vx: f32
§vy: f32
§tx: f32
§ty: f32
Implementations§
Trait Implementations§
Source§impl Clone for AffineTransform
impl Clone for AffineTransform
Source§fn clone(&self) -> AffineTransform
fn clone(&self) -> AffineTransform
Returns a copy 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 AffineTransform
impl Debug for AffineTransform
Source§impl Default for AffineTransform
impl Default for AffineTransform
Source§impl Hash for AffineTransform
impl Hash for AffineTransform
Source§impl PartialEq for AffineTransform
impl PartialEq for AffineTransform
Source§impl TryFrom<AffineTransform> for GeomPresTransform
impl TryFrom<AffineTransform> for GeomPresTransform
Source§type Error = GeomPresTransformError
type Error = GeomPresTransformError
The type returned in the event of a conversion error.
impl Copy for AffineTransform
impl Eq for AffineTransform
Auto Trait Implementations§
impl Freeze for AffineTransform
impl RefUnwindSafe for AffineTransform
impl Send for AffineTransform
impl Sync for AffineTransform
impl Unpin for AffineTransform
impl UnwindSafe for AffineTransform
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)