Struct forma::AffineTransform
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§
§impl AffineTransform
impl AffineTransform
Trait Implementations§
§impl Clone for AffineTransform
impl Clone for AffineTransform
§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 more§impl Debug for AffineTransform
impl Debug for AffineTransform
§impl Default for AffineTransform
impl Default for AffineTransform
§fn default() -> AffineTransform
fn default() -> AffineTransform
Returns the “default value” for a type. Read more
§impl From<[f32; 6]> for AffineTransform
impl From<[f32; 6]> for AffineTransform
§fn from(transform: [f32; 6]) -> AffineTransform
fn from(transform: [f32; 6]) -> AffineTransform
Converts to this type from the input type.
§impl Hash for AffineTransform
impl Hash for AffineTransform
§impl PartialEq for AffineTransform
impl PartialEq for AffineTransform
§fn eq(&self, other: &AffineTransform) -> bool
fn eq(&self, other: &AffineTransform) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl TryFrom<AffineTransform> for GeomPresTransform
impl TryFrom<AffineTransform> for GeomPresTransform
§type Error = GeomPresTransformError
type Error = GeomPresTransformError
The type returned in the event of a conversion error.
§fn try_from(
t: AffineTransform,
) -> Result<GeomPresTransform, <GeomPresTransform as TryFrom<AffineTransform>>::Error>
fn try_from( t: AffineTransform, ) -> Result<GeomPresTransform, <GeomPresTransform as TryFrom<AffineTransform>>::Error>
Performs the conversion.
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)