pub trait MatrixHelpers<Src, Dst> {
Show 14 methods // Required methods fn preserves_2d_axis_alignment(&self) -> bool; fn has_perspective_component(&self) -> bool; fn has_2d_inverse(&self) -> bool; fn exceeds_2d_scale(&self, limit: f64) -> bool; fn inverse_project( &self, target: &Point2D<f32, Dst> ) -> Option<Point2D<f32, Src>>; fn inverse_rect_footprint( &self, rect: &Box2D<f32, Dst> ) -> Option<Box2D<f32, Src>>; fn transform_kind(&self) -> TransformedRectKind; fn is_simple_translation(&self) -> bool; fn is_simple_2d_translation(&self) -> bool; fn is_2d_scale_translation(&self) -> bool; fn determinant_2d(&self) -> f32; fn inverse_project_2d_origin(&self) -> Option<Point2D<f32, Src>>; fn flatten_z_output(&mut self); fn cast_unit<NewSrc, NewDst>(&self) -> Transform3D<f32, NewSrc, NewDst>;
}

Required Methods§

source

fn preserves_2d_axis_alignment(&self) -> bool

A port of the preserves2dAxisAlignment function in Skia. Defined in the SkMatrix44 class.

source

fn has_perspective_component(&self) -> bool

source

fn has_2d_inverse(&self) -> bool

source

fn exceeds_2d_scale(&self, limit: f64) -> bool

Check if the matrix post-scaling on either the X or Y axes could cause geometry transformed by this matrix to have scaling exceeding the supplied limit.

source

fn inverse_project( &self, target: &Point2D<f32, Dst> ) -> Option<Point2D<f32, Src>>

source

fn inverse_rect_footprint( &self, rect: &Box2D<f32, Dst> ) -> Option<Box2D<f32, Src>>

source

fn transform_kind(&self) -> TransformedRectKind

source

fn is_simple_translation(&self) -> bool

source

fn is_simple_2d_translation(&self) -> bool

source

fn is_2d_scale_translation(&self) -> bool

source

fn determinant_2d(&self) -> f32

Return the determinant of the 2D part of the matrix.

source

fn inverse_project_2d_origin(&self) -> Option<Point2D<f32, Src>>

This function returns a point in the Src space that projects into zero XY. It ignores the Z coordinate and is usable for “flattened” transformations, since they are not generally inversible.

source

fn flatten_z_output(&mut self)

Turn Z transformation into identity. This is useful when crossing “flat” transform styled stacking contexts upon traversing the coordinate systems.

source

fn cast_unit<NewSrc, NewDst>(&self) -> Transform3D<f32, NewSrc, NewDst>

Implementations on Foreign Types§

source§

impl<Src, Dst> MatrixHelpers<Src, Dst> for Transform3D<f32, Src, Dst>

source§

fn inverse_project( &self, target: &Point2D<f32, Dst> ) -> Option<Point2D<f32, Src>>

Find out a point in Src that would be projected into the target.

source§

fn preserves_2d_axis_alignment(&self) -> bool

source§

fn has_perspective_component(&self) -> bool

source§

fn has_2d_inverse(&self) -> bool

source§

fn exceeds_2d_scale(&self, limit: f64) -> bool

source§

fn inverse_rect_footprint( &self, rect: &Box2D<f32, Dst> ) -> Option<Box2D<f32, Src>>

source§

fn transform_kind(&self) -> TransformedRectKind

source§

fn is_simple_translation(&self) -> bool

source§

fn is_simple_2d_translation(&self) -> bool

source§

fn is_2d_scale_translation(&self) -> bool

source§

fn determinant_2d(&self) -> f32

source§

fn inverse_project_2d_origin(&self) -> Option<Point2D<f32, Src>>

source§

fn flatten_z_output(&mut self)

source§

fn cast_unit<NewSrc, NewDst>(&self) -> Transform3D<f32, NewSrc, NewDst>

Implementors§