Interface SvgElement
- All Known Implementing Classes:
SvgCircle, SvgContent, SvgDocument, SvgGroup, SvgImage, SvgLine, SvgRect, SvgText
public sealed interface SvgElement
permits SvgCircle, SvgContent, SvgDocument, SvgGroup, SvgImage, SvgLine, SvgRect, SvgText (not exhaustive)
Sealed interface for SVG element model objects.
Each subtype represents a specific SVG element type.
-
Method Summary
Modifier and TypeMethodDescriptiondefault SvgAttributesReturns the SVG attributes for this element.default List<SvgElement> children()Returns the child elements of this element.default Stringmarkup()Returns the SVG tag name for this element.default StringSerializes this element and its children into an SVG markup string.
-
Method Details
-
serialize
Serializes this element and its children into an SVG markup string.- Returns:
- the SVG markup string
-
markup
-
attributes
Returns the SVG attributes for this element.- Returns:
- the SVG attributes
-
children
Returns the child elements of this element.- Returns:
- the child elements, or an empty list if none
-