pub type PathCommand = GenericShapeCommand<CSSFloat, ShapePosition<CSSFloat>, CSSFloat>;Expand description
The SVG path command. The fields of these commands are self-explanatory, so we skip the documents. Note: the index of the control points, e.g. control1, control2, are mapping to the control points of the Bézier curve in the spec.
https://www.w3.org/TR/SVG11/paths.html#PathData
Aliased Type§
#[repr(C, u8)]pub enum PathCommand {
Move {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
},
Line {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
},
HLine {
x: AxisEndPoint<f32>,
},
VLine {
y: AxisEndPoint<f32>,
},
CubicCurve {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
control1: ControlPoint<GenericPosition<f32, f32>, f32>,
control2: ControlPoint<GenericPosition<f32, f32>, f32>,
},
QuadCurve {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
control1: ControlPoint<GenericPosition<f32, f32>, f32>,
},
SmoothCubic {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
control2: ControlPoint<GenericPosition<f32, f32>, f32>,
},
SmoothQuad {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
},
Arc {
point: CommandEndPoint<GenericPosition<f32, f32>, f32>,
radii: ArcRadii<f32>,
arc_sweep: ArcSweep,
arc_size: ArcSize,
rotate: f32,
},
Close,
}Variants§
Move
The move command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>Line
The line command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>HLine
The hline command.
Fields
§
x: AxisEndPoint<f32>VLine
The vline command.
Fields
§
y: AxisEndPoint<f32>CubicCurve
The cubic Bézier curve command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>§
control1: ControlPoint<GenericPosition<f32, f32>, f32>§
control2: ControlPoint<GenericPosition<f32, f32>, f32>QuadCurve
The quadratic Bézier curve command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>§
control1: ControlPoint<GenericPosition<f32, f32>, f32>SmoothCubic
The smooth command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>§
control2: ControlPoint<GenericPosition<f32, f32>, f32>SmoothQuad
The smooth quadratic Bézier curve command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>Arc
The arc command.
Fields
§
point: CommandEndPoint<GenericPosition<f32, f32>, f32>Close
The closepath command.