Type Alias graphics::math::Matrix2d

source ·
pub type Matrix2d<T = Scalar> = Matrix2x3<T>;
Expand description

The type used for matrices.

Trait Implementations§

source§

impl Transformed for Matrix2d

source§

fn append_transform(self, transform: Matrix2d) -> Self

Appends transform to the current one.
source§

fn prepend_transform(self, transform: Matrix2d) -> Self

Prepends transform to the current one.
source§

fn trans(self, x: Scalar, y: Scalar) -> Self

Translate x and y in local coordinates.
source§

fn rot_rad(self, angle: Scalar) -> Self

Rotate radians in local coordinates.
source§

fn orient(self, x: Scalar, y: Scalar) -> Self

Orients x axis to look at point locally. Read more
source§

fn scale(self, sx: Scalar, sy: Scalar) -> Self

Scales in local coordinates.
source§

fn shear(self, x: Scalar, y: Scalar) -> Self

Shears in local coordinates.
source§

fn rot_deg(self, angle: Scalar) -> Self

Rotates degrees in local coordinates.
source§

fn trans_pos<P: Into<Vec2d>>(self, pos: P) -> Self

Translate position in local coordinates.
source§

fn orient_pos<P: Into<Vec2d>>(self, pos: P) -> Self

Orients x axis to look at point locally.
source§

fn scale_pos<P: Into<Vec2d>>(self, pos: P) -> Self

Scales in local coordinates.
source§

fn zoom(self, s: Scalar) -> Self

Scales in both directions in local coordinates.
source§

fn flip_v(self) -> Self

Flips vertically in local coordinates.
source§

fn flip_h(self) -> Self

Flips horizontally in local coordinates.
source§

fn flip_hv(self) -> Self

Flips horizontally and vertically in local coordinates.
source§

fn shear_pos<P: Into<Vec2d>>(self, pos: P) -> Self

Shears in local coordinates.