pub type PathCommand = GenericShapeCommand<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 {
by_to: ByTo,
point: CoordinatePair<f32>,
},
Line {
by_to: ByTo,
point: CoordinatePair<f32>,
},
HLine {
by_to: ByTo,
x: f32,
},
VLine {
by_to: ByTo,
y: f32,
},
CubicCurve {
by_to: ByTo,
point: CoordinatePair<f32>,
control1: CoordinatePair<f32>,
control2: CoordinatePair<f32>,
},
QuadCurve {
by_to: ByTo,
point: CoordinatePair<f32>,
control1: CoordinatePair<f32>,
},
SmoothCubic {
by_to: ByTo,
point: CoordinatePair<f32>,
control2: CoordinatePair<f32>,
},
SmoothQuad {
by_to: ByTo,
point: CoordinatePair<f32>,
},
Arc {
by_to: ByTo,
point: CoordinatePair<f32>,
radii: CoordinatePair<f32>,
arc_sweep: ArcSweep,
arc_size: ArcSize,
rotate: f32,
},
Close,
}Variants§
Move
The move command.
Line
The line command.
HLine
The hline command.
VLine
The vline command.
CubicCurve
The cubic Bézier curve command.
QuadCurve
The quadratic Bézier curve command.
SmoothCubic
The smooth command.
SmoothQuad
The smooth quadratic Bézier curve command.
Arc
The arc command.
Close
The closepath command.