Module resvg::svgdom
[−]
[src]
This library is designed to represent SVG data as a tree structure.
Here is simple overview of such structure:
The Document
itself is just a container of Node
s.
You can create new Node
s only through the Document
. Parsing and generating of the SVG data also
done through it.
The Node
represents any kind of an XML node.
It can be an element, a comment, a text, etc. There are no different structs for each type.
The TagName
represents a tag name of the element node. It's an enum of
ElementId
and String
types. The ElementId
contains all possible
SVG element names and String
used for non-SVG elements. Such separation used for
performance reasons.
The Attributes
container wraps a Vec
of Attribute
's.
At last, the id
attribute is stored as a separate value and not as part of the Attributes
.
Structs
Ancestors |
An iterator of nodes to the ancestors a given node. |
AspectRatio |
Representation of the |
Attribute |
Representation of the SVG attribute object. |
Attributes |
An attributes list. |
Children |
An iterator of nodes to the children of a given node. |
Color |
Representation of the |
Descendants |
An iterator of nodes to a given node and its descendants, in tree order. |
DisplaySvg |
A wrapper to use |
Document |
Container of |
FollowingSiblings |
An iterator of nodes to the siblings after a given node. |
Length |
Representation of the |
LengthList |
Representation of the |
NodeData |
Node's data. |
NumberList |
Representation of the |
ParseOptions |
Options that defines SVG parsing. |
Path |
Representation of the SVG path data. |
PathBuilder |
A builder for |
Points |
Representation of the |
PrecedingSiblings |
An iterator of nodes to the siblings before a given node. |
ReverseChildren |
An iterator of nodes to the children of a given node, in reverse order. |
ReverseTraverse |
An iterator of nodes to a given node and its descendants, in reverse tree order. |
StrSpan |
An immutable string slice. |
Transform |
Representation of the |
Traverse |
An iterator of nodes to a given node and its descendants, in tree order. |
ValueWriteOptions |
Options for SVG types writing. |
ViewBox |
Representation of the |
WriteOptions |
Options that defines SVG writing. |
Enums
Align |
Representation of the |
AttributeId |
List of all SVG attributes. |
AttributeValue |
Value of the SVG attribute. |
AttributesOrder |
An attributes order. |
ElementId |
List of all SVG elements. |
Error |
SVG DOM errors. |
Indent |
XML node indention |
LengthUnit |
List of all SVG length units. |
ListSeparator |
A separator type for a list of values. |
NodeEdge |
A node type during traverse. |
NodeType |
List of supported node types. |
PaintFallback |
Representation of the fallback part of the |
PathCommand |
List of all path commands. |
PathSegment |
Representation of the path segment. |
QName |
Qualified name. |
QNameRef |
Qualified name reference. |
Traits
AttributeType |
This trait contains methods that check attribute's type according to the SVG spec. |
ElementType |
This trait contains methods that check element's type according to the SVG spec. |
FilterSvg |
An iterator over SVG elements. |
FilterSvgAttrs |
An iterator over SVG attributes. |
FilterSvgAttrsMut |
An iterator over SVG attributes. |
FromSpan |
A trait for parsing data from a string. |
FuzzyEq |
A trait for fuzzy/approximate equality comparisons. |
FuzzyZero |
A trait for fuzzy/approximate comparisons of |
SvgId |
A trait for SVG id's. |
ValueWriteBuffer |
A trait for writing data to the buffer. |
WriteBuffer |
A trait for writing data to the buffer. |
Type Definitions
AttributeQName |
Type alias for |
AttributeQNameRef |
Type alias for |
Node |
Representation of the SVG node. |
TagName |
Type alias for |
TagNameRef |
Type alias for |