pub enum CanvasOp {
Show 19 variants
MoveTo {
x: f64,
y: f64,
},
LineTo {
x: f64,
y: f64,
},
BezierCurveTo {
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64,
},
QuadraticCurveTo {
cpx: f64,
cpy: f64,
x: f64,
y: f64,
},
ClosePath,
Rect {
x: f64,
y: f64,
width: f64,
height: f64,
},
Circle {
cx: f64,
cy: f64,
r: f64,
},
Ellipse {
cx: f64,
cy: f64,
rx: f64,
ry: f64,
},
Arc {
cx: f64,
cy: f64,
r: f64,
start_angle: f64,
end_angle: f64,
counterclockwise: bool,
},
Stroke,
Fill,
FillAndStroke,
SetFillColor {
r: f64,
g: f64,
b: f64,
},
SetStrokeColor {
r: f64,
g: f64,
b: f64,
},
SetLineWidth {
width: f64,
},
SetLineCap {
cap: u32,
},
SetLineJoin {
join: u32,
},
Save,
Restore,
}Expand description
A canvas drawing operation.
Variants§
MoveTo
LineTo
BezierCurveTo
QuadraticCurveTo
ClosePath
Rect
Circle
Ellipse
Arc
Stroke
Fill
FillAndStroke
SetFillColor
SetStrokeColor
SetLineWidth
SetLineCap
SetLineJoin
Save
Restore
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CanvasOp
impl<'de> Deserialize<'de> for CanvasOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CanvasOp
impl RefUnwindSafe for CanvasOp
impl Send for CanvasOp
impl Sync for CanvasOp
impl Unpin for CanvasOp
impl UnsafeUnpin for CanvasOp
impl UnwindSafe for CanvasOp
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