Struct svgdom::Attribute [] [src]

pub struct Attribute {
    pub id: AttributeId,
    pub value: AttributeValue,
    pub visible: bool,
}

Representation oh the SVG attribute object.

Fields

Internal ID of the attribute.

Attribute value.

Visibility.

Unlike many other DOM implementations, libsvgdom supports hiding of the attributes, instead removing them. Invisible attributes acts just like other attributes, but they will not be printed during SVG writing. Unless you enable them via WriteOptions.

All attributes are visible by default.

Methods

impl Attribute
[src]

Constructs a new attribute.

Constructs a new attribute with default value, if it known.

Returns true if current attribute's value is equal to default by SVG spec.

Returns true if current attribute is part of presentation attributes.

Returns true if current attribute is part of animation event attributes.

Returns true if current attribute is part of graphical event attributes.

Returns true if current attribute is part of document event attributes.

Returns true if current attribute is part of conditional processing attributes.

Returns true if current attribute is part of core attributes.

NOTE: the id attribute is part of core attributes, but we don't store it here since it's part of the Node struct.

Returns true if current attribute is part of fill attributes.

List of fill attributes: fill, fill-opacity, fill-rule.

This check is not defined by SVG spec.

Returns true if current attribute is part of stroke attributes.

List of stroke attributes: stroke, stroke-dasharray, stroke-dashoffset, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width.

This check is not defined by SVG spec.

Trait Implementations

impl PartialEq for Attribute
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Attribute
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Attribute
[src]

Formats the value using the given formatter.

impl WriteBuffer for Attribute
[src]

Writes data to Vec<u8> buffer using specified WriteOptions.

Writes data to Vec<u8> buffer using default WriteOptions.

impl Display for Attribute
[src]

Formats the value using the given formatter.

impl WriteToString for Attribute
[src]

Writes data to String using specified WriteOptions.