Struct svgdom::WriteOptions
[−]
[src]
pub struct WriteOptions { pub indent: i8, pub use_single_quote: bool, pub trim_hex_colors: bool, pub write_hidden_attributes: bool, pub numbers: WriteOptionsNumbers, pub paths: WriteOptionsPaths, pub transforms: WriteOptionsTransforms, }
Options used during writing.
Fields
indent: i8
Set XML nodes indention.
Range: -1..4 (-1 indicates no spaces and new lines)
Example:
Before:
<svg>
<rect fill="red"/>
</svg>
After:
<svg><rect fill="red"/></svg>
Default: 4
use_single_quote: bool
Use single quote marks instead of double quote.
Example:
<rect fill="red"/>
<rect fill='red'/>
Default: disabled
trim_hex_colors: bool
Use #RGB color notation when possible.
By default all colors written using #RRGGBB notation.
Example:
#ff0000
-> #f00
, #000000
-> #000
, #00aa00
-> #0a0
Default: disabled
Write hidden attributes.
libsvgdom support invisible attributes, which can be dumped to output using this option.
See svgdom::Attribute
documentation.
Default: disabled
numbers: WriteOptionsNumbers
Numbers options.
See WriteOptionsNumbers
documentation.
paths: WriteOptionsPaths
Paths options.
See WriteOptionsPaths
documentation.
transforms: WriteOptionsTransforms
Transforms options.
See WriteOptionsTransforms
documentation.
Trait Implementations
impl Default for WriteOptions
[src]
fn default() -> WriteOptions
Returns the "default value" for a type. Read more