Skip to main content

CanvasItem

Trait CanvasItem 

Source
pub trait CanvasItem:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn draw(&self, context: &mut CanvasContext);
}
Expand description

Immutable frame data that records drawing commands after Canvas size is known.

Required Methods§

Source

fn draw(&self, context: &mut CanvasContext)

Records this item’s commands after the Canvas size is final.

Implementors§