Draw

Trait Draw 

Source
pub trait Draw<V: Vertex, G> {
    // Required methods
    fn draw(&mut self, geometry: G);
    fn draw_with_transform<TX>(&mut self, geometry: G, transform: TX)
       where TX: Into<ColumnMatrix4<f32>>;
    fn draw_with_color<C: Into<Color>>(&mut self, geometry: G, color: C);
    fn draw_with_color_and_transform<C, TX>(
        &mut self,
        geometry: G,
        color: C,
        transform: TX,
    )
       where C: Into<Color>,
             TX: Into<ColumnMatrix4<f32>>;
    fn image<T: Texture>(&mut self, geometry: G, texture: T);
    fn image_with_color<T, C>(&mut self, geometry: G, texture: T, color: C)
       where T: Texture,
             C: Into<Color>;
    fn image_with_transform<T, TX>(
        &mut self,
        geometry: G,
        texture: T,
        transform: TX,
    )
       where T: Texture,
             TX: Into<ColumnMatrix4<f32>>;
    fn image_with_color_and_transform<T, C, TX>(
        &mut self,
        geometry: G,
        texture: T,
        color: C,
        transform: TX,
    )
       where T: Texture,
             C: Into<Color>,
             TX: Into<ColumnMatrix4<f32>>;
}

Required Methods§

Source

fn draw(&mut self, geometry: G)

Source

fn draw_with_transform<TX>(&mut self, geometry: G, transform: TX)
where TX: Into<ColumnMatrix4<f32>>,

Source

fn draw_with_color<C: Into<Color>>(&mut self, geometry: G, color: C)

Source

fn draw_with_color_and_transform<C, TX>( &mut self, geometry: G, color: C, transform: TX, )
where C: Into<Color>, TX: Into<ColumnMatrix4<f32>>,

Source

fn image<T: Texture>(&mut self, geometry: G, texture: T)

Source

fn image_with_color<T, C>(&mut self, geometry: G, texture: T, color: C)
where T: Texture, C: Into<Color>,

Source

fn image_with_transform<T, TX>( &mut self, geometry: G, texture: T, transform: TX, )
where T: Texture, TX: Into<ColumnMatrix4<f32>>,

Source

fn image_with_color_and_transform<T, C, TX>( &mut self, geometry: G, texture: T, color: C, transform: TX, )
where T: Texture, C: Into<Color>, TX: Into<ColumnMatrix4<f32>>,

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<'a, G> Draw<Vertex2D, G> for DrawList<'a>
where G: GeometryKind<'a, Vertex2D> + 'a,

Source§

impl<'a, G> Draw<Vertex3D, G> for DrawList<'a>
where G: GeometryKind<'a, Vertex3D> + 'a,