Type Alias style::values::specified::basic_shape::ShapeCommand
source · pub type ShapeCommand = GenericShapeCommand<Angle, LengthPercentage>;
Expand description
The specified value of ShapeCommand
.
Aliased Type§
enum ShapeCommand {
Move {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
},
Line {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
},
HLine {
by_to: ByTo,
x: LengthPercentage,
},
VLine {
by_to: ByTo,
y: LengthPercentage,
},
CubicCurve {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
control1: CoordinatePair<LengthPercentage>,
control2: CoordinatePair<LengthPercentage>,
},
QuadCurve {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
control1: CoordinatePair<LengthPercentage>,
},
SmoothCubic {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
control2: CoordinatePair<LengthPercentage>,
},
SmoothQuad {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
},
Arc {
by_to: ByTo,
point: CoordinatePair<LengthPercentage>,
radii: CoordinatePair<LengthPercentage>,
arc_sweep: ArcSweep,
arc_size: ArcSize,
rotate: Angle,
},
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.
Fields
§
point: CoordinatePair<LengthPercentage>
§
control1: CoordinatePair<LengthPercentage>
§
control2: CoordinatePair<LengthPercentage>
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.
Trait Implementations§
source§impl Parse for ShapeCommand
impl Parse for ShapeCommand
source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more