[][src]Struct pathfinder_canvas::Transform2F

pub struct Transform2F {
    pub matrix: Matrix2x2F,
    pub vector: Vector2F,
}

An affine transform, optimized with SIMD.

Fields

matrix: Matrix2x2Fvector: Vector2F

Methods

impl Transform2F[src]

pub fn from_scale<S>(scale: S) -> Transform2F where
    S: IntoVector2F
[src]

pub fn from_rotation(theta: f32) -> Transform2F[src]

pub fn from_rotation_vector(vector: UnitVector) -> Transform2F[src]

pub fn from_translation(vector: Vector2F) -> Transform2F[src]

pub fn from_scale_rotation_translation<S>(
    scale: S,
    theta: f32,
    translation: Vector2F
) -> Transform2F where
    S: IntoVector2F
[src]

pub fn row_major(
    m11: f32,
    m12: f32,
    m21: f32,
    m22: f32,
    m31: f32,
    m32: f32
) -> Transform2F
[src]

pub fn to_3d(&self) -> Transform4F[src]

pub fn is_identity(&self) -> bool[src]

pub fn extract_scale(&self) -> Vector2F[src]

Extracts the scale from this matrix.

pub fn m11(&self) -> f32[src]

pub fn m21(&self) -> f32[src]

pub fn m12(&self) -> f32[src]

pub fn m22(&self) -> f32[src]

pub fn m31(&self) -> f32[src]

pub fn m32(&self) -> f32[src]

pub fn translate(&self, vector: Vector2F) -> Transform2F[src]

pub fn rotate(&self, theta: f32) -> Transform2F[src]

pub fn scale<S>(&self, scale: S) -> Transform2F where
    S: IntoVector2F
[src]

pub fn translation(&self) -> Vector2F[src]

Returns the translation part of this matrix.

This decomposition assumes that scale, rotation, and translation are applied in that order.

pub fn rotation(&self) -> f32[src]

Returns the rotation angle of this matrix.

This decomposition assumes that scale, rotation, and translation are applied in that order.

pub fn scale_factor(&self) -> f32[src]

Returns the scale factor of this matrix.

This decomposition assumes that scale, rotation, and translation are applied in that order.

pub fn inverse(&self) -> Transform2F[src]

Trait Implementations

impl Clone for Transform2F[src]

impl Copy for Transform2F[src]

impl Debug for Transform2F[src]

impl Default for Transform2F[src]

impl Mul<LineSegment2F> for Transform2F[src]

type Output = LineSegment2F

The resulting type after applying the * operator.

impl Mul<RectF> for Transform2F[src]

type Output = RectF

The resulting type after applying the * operator.

impl Mul<Transform2F> for Transform2F[src]

type Output = Transform2F

The resulting type after applying the * operator.

impl Mul<Vector2F> for Transform2F[src]

type Output = Vector2F

The resulting type after applying the * operator.

impl MulAssign<Transform2F> for Transform2F[src]

impl PartialEq<Transform2F> for Transform2F[src]

impl StructuralPartialEq for Transform2F[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.