pub struct RecordingCanvas { /* private fields */ }Expand description
Simple canvas implementation for recording commands
Implementations§
Trait Implementations§
Source§impl Canvas for RecordingCanvas
impl Canvas for RecordingCanvas
Source§fn draw(&mut self, command: DrawCommand)
fn draw(&mut self, command: DrawCommand)
Record a draw command
Source§fn commands(&self) -> &[DrawCommand]
fn commands(&self) -> &[DrawCommand]
Get all recorded commands
Source§fn with_transform(&self, transform: Transform2D) -> Box<dyn Canvas>
fn with_transform(&self, transform: Transform2D) -> Box<dyn Canvas>
Create a sub-canvas with transform
Auto Trait Implementations§
impl Freeze for RecordingCanvas
impl RefUnwindSafe for RecordingCanvas
impl Send for RecordingCanvas
impl Sync for RecordingCanvas
impl Unpin for RecordingCanvas
impl UnsafeUnpin for RecordingCanvas
impl UnwindSafe for RecordingCanvas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more