embedded_graphics::transform

Trait Transform

Source
pub trait Transform {
    // Required methods
    fn translate(&self, by: Point) -> Self;
    fn translate_mut(&mut self, by: Point) -> &mut Self;
}
Expand description

Transform operations

Required Methods§

Source

fn translate(&self, by: Point) -> Self

Move the origin of an object by a given number of (x, y) pixels, returning a new object

Source

fn translate_mut(&mut self, by: Point) -> &mut Self

Move the origin of an object by a given number of (x, y) pixels, mutating the object in place

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Transform for Text<'_>

Source§

impl Transform for Circle

Source§

impl Transform for Line

Source§

impl Transform for Rectangle

Source§

impl Transform for Triangle

Source§

impl<I, C> Transform for Image<'_, I, C>

Source§

impl<T, S> Transform for Styled<T, S>
where T: Transform, S: Clone,