Struct gate::renderer::Affine[][src]

pub struct Affine { /* fields omitted */ }

Represents an affine transformation in 2D space.

Methods

impl Affine
[src]

Identity transformation.

Returns a translation transformation.

Returns a rotation transformation, rotating counter-clockwise by angle radians.

Returns a scaling transformation, scaling x and y axes separately.

Returns a scaling transformation, scaling x and y axes identically.

Returns a transformation that is functionally equivalent to self composed with rhs.

This means that the rhs transformation is invoked first, and then the self transformation is invoked on the output of that. This is usually the desired ordering with graphics transformations.

Logically equivalent to self.pre_transform(&Affine::scale_axes(scale_x, scale_y)).

Logically equivalent to self.pre_transform(&Affine::scale(scale)).

Logically equivalent to self.pre_transform(&Affine::rotate(angle)).

Logically equivalent to self.pre_transform(&Affine::translate(x_offset, y_offset)).

Logically equivalent to Affine::scale_axes(scale_x, scale_y).pre_transform(self).

Logically equivalent to Affine::scale(scale).pre_transform(self).

Logically equivalent to Affine::rotate(angle).pre_transform(self).

Logically equivalent to Affine::translate(x_offset, y_offset).pre_transform(self).

Trait Implementations

impl Copy for Affine
[src]

impl Clone for Affine
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Affine

impl Sync for Affine