Expand description
Specified types for SVG Path.
Macrosยง
- parse_
arguments ๐
Structsยง
- Path
Parser ๐SVG Path parser. - Path
Traversal ๐State For internal SVGPath normalization. - The SVG path data.
Enumsยง
- Whether to allow empty string in the parser.
Functionsยง
- parse_
coord ๐Parse a pair of numbers into CoordPair. - parse_
number ๐This is a special version which parses the number for SVG Path. e.g. โM 0.6.5โ should be parsed as MoveTo with a coordinate of (โ0.6โ, โ.5โ), instead of treating 0.6.5 as a non-valid floating point number. In other words, the logic here is similar with that of tokenizer::consume_numeric, which also consumes the number as many as possible, but here the input is a Peekable and we only accept an integer of a floating point number. - skip_
comma_ ๐wsp Skip all svg whitespaces and one comma, and return true if |iter| hasnโt finished. - skip_
wsp ๐Skip all svg whitespaces, and return true if |iter| hasnโt finished.
Type Aliasesยง
- The path coord type.
- 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.