Struct svgdom::WriteOptionsPaths
[−]
[src]
pub struct WriteOptionsPaths { pub use_compact_notation: bool, pub join_arc_to_flags: bool, pub remove_duplicated_commands: bool, }
Options that defines SVG paths writing.
Fields
use_compact_notation: bool
Use compact path notation.
SVG allow us to remove some symbols from path notation without breaking parsing.
Example:
M 10 -20 A 5.5 0.3 -4 1 1 0 -0.1
-> M10-20A5.5.3-4 1 1 0-.1
Default: disabled
join_arc_to_flags: bool
Join ArcTo flags.
Elliptical arc curve segment has flags parameters, which can have values of 0
or 1
.
Since we have fixed-width values, we can skip spaces between them.
Example:
A 5 5 30 1 1 10 10
-> A 5 5 30 1110 10
Default: disabled
Note: Sadly, but most of the viewers doesn't support such notation, even throw it's valid by SVG spec.
remove_duplicated_commands: bool
Remove duplicated commands.
If the segment has the same type as previous - we can skip command specifier.
Example:
M 10 10 L 20 20 L 30 30 L 40 40
-> M 10 10 L 20 20 30 30 40 40
Default: disabled