pub trait Shape { // Required method fn draw(&self, painter: &mut Painter<'_, '_>); }
Something that can be drawn on a Canvas.
Canvas
You may implement your own canvas custom widgets by implementing this trait.
Draws this Shape using the given Painter.
Shape
Painter
This is the only method required to implement a custom widget that can be drawn on a Canvas.