pub enum CanvasDrawCommand {
Circle {
cx: f64,
cy: f64,
r: f64,
fill: Option<ColorValue>,
stroke: Option<ColorValue>,
stroke_width: Option<f64>,
},
Line {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
stroke: Option<ColorValue>,
stroke_width: Option<f64>,
line_cap: Option<String>,
},
Rect {
x: f64,
y: f64,
width: f64,
height: f64,
fill: Option<ColorValue>,
stroke: Option<ColorValue>,
stroke_width: Option<f64>,
corner_radius: Option<f64>,
},
Arc {
cx: f64,
cy: f64,
r: f64,
start_angle: f64,
end_angle: f64,
fill: Option<ColorValue>,
stroke: Option<ColorValue>,
stroke_width: Option<f64>,
},
Text {
x: f64,
y: f64,
content: String,
font_size: Option<f64>,
color: Option<ColorValue>,
anchor: Option<String>,
},
Path {
d: String,
fill: Option<ColorValue>,
stroke: Option<ColorValue>,
stroke_width: Option<f64>,
},
}Variants§
Circle
Line
Fields
§
stroke: Option<ColorValue>Rect
Arc
Text
Fields
§
color: Option<ColorValue>Path
Trait Implementations§
Source§impl Clone for CanvasDrawCommand
impl Clone for CanvasDrawCommand
Source§fn clone(&self) -> CanvasDrawCommand
fn clone(&self) -> CanvasDrawCommand
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 CanvasDrawCommand
impl Debug for CanvasDrawCommand
Source§impl<'de> Deserialize<'de> for CanvasDrawCommand
impl<'de> Deserialize<'de> for CanvasDrawCommand
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
Source§impl JsonSchema for CanvasDrawCommand
impl JsonSchema for CanvasDrawCommand
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for CanvasDrawCommand
impl RefUnwindSafe for CanvasDrawCommand
impl Send for CanvasDrawCommand
impl Sync for CanvasDrawCommand
impl Unpin for CanvasDrawCommand
impl UnsafeUnpin for CanvasDrawCommand
impl UnwindSafe for CanvasDrawCommand
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