Struct flo_canvas::Canvas [−][src]
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.
Implementations
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 CanvasGraphicsContext<'_>),
[src]
FnAction: Send + FnOnce(&mut CanvasGraphicsContext<'_>),
Provides a way to draw on this canvas via a GC
pub fn stream(&self) -> impl Stream<Item = Draw> + 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
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Canvas
[src]
impl Send for Canvas
[src]
impl Sync for Canvas
[src]
impl Unpin for Canvas
[src]
impl UnwindSafe for Canvas
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,