Trait MatrixBackend

Source
pub trait MatrixBackend:
    Clone
    + Mul<Self, Output = Self>
    + Sized {
    // Required methods
    fn identity() -> Self
       where Self: Sized;
    fn from_row(
        scx: Float,
        sky: Float,
        skx: Float,
        scy: Float,
        tx: Float,
        ty: Float,
    ) -> Self
       where Self: Sized;
    fn from_translate(x: Float, y: Float) -> Self
       where Self: Sized;
    fn from_scale(x: Float, y: Float) -> Self
       where Self: Sized;
    fn from_rotate(angle: Float) -> Self
       where Self: Sized;
    fn pre_rotate(&mut self, angle: Float);
    fn pre_scale(&mut self, x: Float, y: Float);
    fn pre_translate(&mut self, x: Float, y: Float);
    fn post_rotate(&mut self, angle: Float);
    fn post_scale(&mut self, x: Float, y: Float);
    fn post_translate(&mut self, x: Float, y: Float);
    fn map_rect(&self, rect: FRect) -> FRect;
}

Required Methods§

Source

fn identity() -> Self
where Self: Sized,

Source

fn from_row( scx: Float, sky: Float, skx: Float, scy: Float, tx: Float, ty: Float, ) -> Self
where Self: Sized,

Source

fn from_translate(x: Float, y: Float) -> Self
where Self: Sized,

Source

fn from_scale(x: Float, y: Float) -> Self
where Self: Sized,

Source

fn from_rotate(angle: Float) -> Self
where Self: Sized,

Source

fn pre_rotate(&mut self, angle: Float)

Source

fn pre_scale(&mut self, x: Float, y: Float)

Source

fn pre_translate(&mut self, x: Float, y: Float)

Source

fn post_rotate(&mut self, angle: Float)

Source

fn post_scale(&mut self, x: Float, y: Float)

Source

fn post_translate(&mut self, x: Float, y: Float)

Source

fn map_rect(&self, rect: FRect) -> FRect

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§