Struct forma_render::math::AffineTransform
source · 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: f32Implementations§
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<AffineTransform> for AffineTransform
impl PartialEq<AffineTransform> for AffineTransform
source§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.
impl Copy for AffineTransform
impl Eq for AffineTransform
Auto Trait Implementations§
impl RefUnwindSafe for AffineTransform
impl Send for AffineTransform
impl Sync for AffineTransform
impl Unpin for AffineTransform
impl UnwindSafe for AffineTransform
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.