pub trait CanvasDrawable: Debug + 'static { fn draw(&self, pixmap: &mut Pixmap); }
Draws to a Canvas’s Pixmap
Canvas
Pixmap
Draw
This is called whenever the Pixmap is resized. One should check the pixmap’s dimensions and scale the contents appropriately.