pub enum CanvasCommand {
FillRect {
bounds: Rect,
color: Rgba,
},
StrokeRect {
bounds: Rect,
color: Rgba,
line_width: f32,
},
ClearRect {
bounds: Rect,
},
DrawLine {
p0: (f32, f32),
p1: (f32, f32),
color: Rgba,
line_width: f32,
},
DrawCircle {
center: (f32, f32),
radius: f32,
fill_color: Option<Rgba>,
stroke_color: Option<Rgba>,
line_width: f32,
},
DrawPath {
verbs: Vec<CanvasPathVerb>,
fill_color: Option<Rgba>,
stroke_color: Option<Rgba>,
line_width: f32,
},
}Expand description
Renderable 2D canvas drawing instruction.
Variants§
Trait Implementations§
Source§impl Clone for CanvasCommand
impl Clone for CanvasCommand
Source§fn clone(&self) -> CanvasCommand
fn clone(&self) -> CanvasCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanvasCommand
impl Debug for CanvasCommand
Source§impl PartialEq for CanvasCommand
impl PartialEq for CanvasCommand
impl StructuralPartialEq for CanvasCommand
Auto Trait Implementations§
impl Forget for CanvasCommand
impl Freeze for CanvasCommand
impl Move for CanvasCommand
impl RefUnwindSafe for CanvasCommand
impl Send for CanvasCommand
impl Sync for CanvasCommand
impl Unpin for CanvasCommand
impl UnsafeUnpin for CanvasCommand
impl UnwindSafe for CanvasCommand
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