Trait graphics::Transformed[][src]

pub trait Transformed: Sized {
Show 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; 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 { ... }
}

Implemented by contexts that can transform.

Required methods

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

Appends transform to the current one.

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

Prepends transform to the current one.

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

Translate x and y in local coordinates.

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

Rotate radians in local coordinates.

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

Orients x axis to look at point locally.

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

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

Scales in local coordinates.

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

Shears in local coordinates.

Loading content...

Provided methods

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

Rotates degrees in local coordinates.

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

Translate position in local coordinates.

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

Orients x axis to look at point locally.

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

Scales in local coordinates.

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

Scales in both directions in local coordinates.

fn flip_v(self) -> Self[src]

Flips vertically in local coordinates.

fn flip_h(self) -> Self[src]

Flips horizontally in local coordinates.

fn flip_hv(self) -> Self[src]

Flips horizontally and vertically in local coordinates.

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

Shears in local coordinates.

Loading content...

Implementors

impl Transformed for Context[src]

impl Transformed for Matrix2d[src]

Loading content...