Struct flo_canvas::Canvas
[−]
[src]
pub struct Canvas { /* fields omitted */ }
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.
Methods
impl Canvas
[src]
pub fn new() -> Canvas
[src]
Creates a new, blank, canvas
pub fn write(&self, to_draw: Vec<Draw>)
[src]
Sends some new drawing commands to this canvas
pub fn draw<FnAction>(&self, action: FnAction) where
FnAction: Send + FnOnce(&mut GraphicsPrimitives),
[src]
FnAction: Send + FnOnce(&mut GraphicsPrimitives),
Provides a way to draw on this canvas via a GC
pub fn stream(&self) -> Box<Stream<Item = Draw, Error = ()> + Send>
[src]
Creates a stream for reading the instructions from this canvas
pub fn get_drawing(&self) -> Vec<Draw>
[src]
Retrieves the list of drawing actions in this canvas