Struct flo_canvas::Canvas [−][src]
pub struct Canvas { /* fields omitted */ }Expand description
A canvas is an abstract interface for drawing graphics. It doesn’t actually provide a means to render anything, but rather a way to describe how things should be drawn and pass those on to a renderer elsewhere.
A canvas can be cloned and sent between threads, so it’s possible for multiple sources to write to the same drawing target.
Canvases maintain a copy of enough of the drawing instructions sent to them to reproduce the rendering on a new render target.
Implementations
pub fn draw<FnAction>(&self, action: FnAction) where
FnAction: Send + FnOnce(&mut CanvasGraphicsContext<'_>),
pub fn draw<FnAction>(&self, action: FnAction) where
FnAction: Send + FnOnce(&mut CanvasGraphicsContext<'_>),
Provides a way to draw on this canvas via a GC
Creates a stream for reading the instructions from this canvas
Retrieves the list of drawing actions in this canvas
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Canvas
impl UnwindSafe for Canvas
Blanket Implementations
Mutably borrows from an owned value. Read more