Skip to main content

Transformed

Trait Transformed 

Source
pub trait Transformed: Sized {
Show 16 methods // Required methods fn append_transform(self, transform: Matrix2d) -> Self; fn prepend_transform(self, transform: Matrix2d) -> Self; fn trans(self, x: Scalar, y: Scalar) -> Self; fn rot_rad(self, angle: Scalar) -> Self; fn orient(self, x: Scalar, y: Scalar) -> Self; fn scale(self, sx: Scalar, sy: Scalar) -> Self; fn shear(self, x: Scalar, y: Scalar) -> Self; // Provided methods fn rot_deg(self, angle: Scalar) -> Self { ... } fn trans_pos<P: Into<Vec2d>>(self, pos: P) -> Self { ... } fn orient_pos<P: Into<Vec2d>>(self, pos: P) -> Self { ... } fn scale_pos<P: Into<Vec2d>>(self, pos: P) -> Self { ... } fn zoom(self, s: Scalar) -> Self { ... } fn flip_v(self) -> Self { ... } fn flip_h(self) -> Self { ... } fn flip_hv(self) -> Self { ... } fn shear_pos<P: Into<Vec2d>>(self, pos: P) -> Self { ... }
}
Expand description

Implemented by contexts that can transform.

Required Methods§

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.

Leaves x axis unchanged if the point to look at is the origin.

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.

Provided Methods§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§