Struct gate::renderer::Affine [−][src]
pub struct Affine { /* fields omitted */ }
Represents an affine transformation in 2D space.
Methods
impl Affine
[src]
impl Affine
pub fn id() -> Affine
[src]
pub fn id() -> Affine
Identity transformation.
pub fn translate(x_offset: f64, y_offset: f64) -> Affine
[src]
pub fn translate(x_offset: f64, y_offset: f64) -> Affine
Returns a translation transformation.
pub fn rotate(angle: f64) -> Affine
[src]
pub fn rotate(angle: f64) -> Affine
Returns a rotation transformation, rotating counter-clockwise by angle
radians.
pub fn scale_axes(scale_x: f64, scale_y: f64) -> Affine
[src]
pub fn scale_axes(scale_x: f64, scale_y: f64) -> Affine
Returns a scaling transformation, scaling x and y axes separately.
pub fn scale(scale: f64) -> Affine
[src]
pub fn scale(scale: f64) -> Affine
Returns a scaling transformation, scaling x and y axes identically.
pub fn pre_transform(&self, rhs: &Affine) -> Affine
[src]
pub fn pre_transform(&self, rhs: &Affine) -> Affine
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.
pub fn pre_scale_axes(&self, scale_x: f64, scale_y: f64) -> Affine
[src]
pub fn pre_scale_axes(&self, scale_x: f64, scale_y: f64) -> Affine
Logically equivalent to self.pre_transform(&Affine::scale_axes(scale_x, scale_y))
.
pub fn pre_scale(&self, scale: f64) -> Affine
[src]
pub fn pre_scale(&self, scale: f64) -> Affine
Logically equivalent to self.pre_transform(&Affine::scale(scale))
.
pub fn pre_rotate(&self, angle: f64) -> Affine
[src]
pub fn pre_rotate(&self, angle: f64) -> Affine
Logically equivalent to self.pre_transform(&Affine::rotate(angle))
.
pub fn pre_translate(&self, x_offset: f64, y_offset: f64) -> Affine
[src]
pub fn pre_translate(&self, x_offset: f64, y_offset: f64) -> Affine
Logically equivalent to self.pre_transform(&Affine::translate(x_offset, y_offset))
.
pub fn post_scale_axes(&self, scale_x: f64, scale_y: f64) -> Affine
[src]
pub fn post_scale_axes(&self, scale_x: f64, scale_y: f64) -> Affine
Logically equivalent to Affine::scale_axes(scale_x, scale_y).pre_transform(self)
.
pub fn post_scale(&self, scale: f64) -> Affine
[src]
pub fn post_scale(&self, scale: f64) -> Affine
Logically equivalent to Affine::scale(scale).pre_transform(self)
.
pub fn post_rotate(&self, angle: f64) -> Affine
[src]
pub fn post_rotate(&self, angle: f64) -> Affine
Logically equivalent to Affine::rotate(angle).pre_transform(self)
.
pub fn post_translate(&self, x_offset: f64, y_offset: f64) -> Affine
[src]
pub fn post_translate(&self, x_offset: f64, y_offset: f64) -> Affine
Logically equivalent to Affine::translate(x_offset, y_offset).pre_transform(self)
.