Skip to main content

CanvasContent

Trait CanvasContent 

Source
pub trait CanvasContent {
    // Required method
    fn draw_view(&self, g: &mut Gfx<'_>, v: CanvasView, rect: [i32; 4]);
}
Expand description

what a canvas shows, drawable through any view (at render time)

Required Methods§

Source

fn draw_view(&self, g: &mut Gfx<'_>, v: CanvasView, rect: [i32; 4])

draw the content through view v into g (origin 0, the clip says what needs pixels, rect = the target’s rectangle): what the canvas’s Draw paints there at this view, without what lies over it, every pixel opaque

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§