SvgRootNode
Represents the root node of an SVG document.
This class holds information about the SVG's dimensions, viewBox, and other attributes. It also manages child nodes and provides access to definitions and gradients.
Constructors
Properties
The set of child nodes of this node.
A map of definitions (elements with an ID) within the SVG. Used for referencing elements by ID, primarily for
A map of gradients defined within the SVG. Used for applying gradients to elements.
The transform applied to the entire SVG. If the SVG has a viewBox with an offset (x or y not 0), a translation is automatically applied to compensate for the offset.
The viewBox attribute defines the position and dimension, in user space, of an SVG viewport.
The height of the SVG's viewport, derived from the viewBox attribute.
The width of the SVG's viewport, derived from the viewBox attribute.
Functions
fun <T : SvgNode, XmlParentNode> SvgElementNode<T>.asNodes(computedRules: List<ComputedRule>, minified: Boolean): List<ImageVectorNode>
fun SvgNode.asNodes(computedRules: List<ComputedRule>, masks: List<SvgMaskNode>, minified: Boolean): List<ImageVectorNode>?
Converts the SVG node to a list of ImageVectorNode.
Normalizes an id by removing prefixes and suffixes commonly used in SVGs.
Calculates the stacked transform of the node by traversing up the tree and concatenating the transform attributes of the ancestors.