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

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 marks instead of double quote.

Example:

<rect fill="red"/>
<rect fill='red'/>

Default: disabled

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 options.

See WriteOptionsNumbers documentation.

Paths options.

See WriteOptionsPaths documentation.

Transforms options.

See WriteOptionsTransforms documentation.

Trait Implementations

impl Default for WriteOptions
[src]

Returns the "default value" for a type. Read more