|
| void | setViewBox (OptionalRef< Boxd > viewBox) |
| | Set the viewBox attribute, which defines a rectangle in userspace that should be mapped to the SVG viewport bounds established by the pattern.
|
|
std::optional< Boxd > | viewBox () const |
| | Get the parsed value of the viewBox attribute, if specified, which defines a rectangle in userspace that should be mapped to the SVG viewport bounds established by the pattern.
|
| void | setPreserveAspectRatio (PreserveAspectRatio preserveAspectRatio) |
| | Set the preserveAspectRatio attribute, which defines how to scale the viewport to fit the content.
|
| PreserveAspectRatio | preserveAspectRatio () const |
| | The value of the preserveAspectRatio attribute, which defines how to scale the viewport to fit the content.
|
| void | setMarkerWidth (double value) |
| | Set the marker width.
|
| double | markerWidth () const |
| | Get the marker width.
|
| void | setMarkerHeight (double value) |
| | Set the marker height.
|
| double | markerHeight () const |
| | Get the marker height.
|
| void | setRefX (double value) |
| | Set the reference point X coordinate.
|
| double | refX () const |
| | Get the reference point X coordinate.
|
| void | setRefY (double value) |
| | Set the reference point Y coordinate.
|
| double | refY () const |
| | Get the reference point Y coordinate.
|
| MarkerUnits | markerUnits () const |
| | Get the markerUnits attribute which defines the coordinate system for attributes markerWidth, markerHeight, and the contents of the marker.
|
| void | setMarkerUnits (MarkerUnits value) |
| | Set the markerUnits attribute which defines the coordinate system for attributes markerWidth, markerHeight, and the contents of the marker.
|
| void | setOrient (MarkerOrient value) |
| | Set the orientation of the marker, the orient attribute.
|
| MarkerOrient | orient () const |
| | Get the orientation of the marker, the orient attribute.
|
|
| SVGElement (const SVGElement &other) |
| | Create another reference to the same SVGElement.
|
|
| SVGElement (SVGElement &&other) noexcept |
| | Move constructor.
|
|
| ~SVGElement () noexcept=default |
| | Destructor.
|
|
SVGElement & | operator= (const SVGElement &other) |
| | Create another reference to the same SVGElement.
|
|
SVGElement & | operator= (SVGElement &&other) noexcept |
| | Move assignment operator.
|
|
ElementType | type () const |
| | Get the ElementType for known XML element types.
|
|
xml::XMLQualifiedNameRef | tagName () const |
| | Get the XML tag name string for this element.
|
|
bool | isKnownType () const |
| | Returns true if this is a known element type, returns false if this is an SVGUnknownElement.
|
|
EntityHandle | entityHandle () const |
| | Get the underlying EntityHandle, for advanced use-cases that require direct access to the ECS.
|
|
RcString | id () const |
| | Get the element id, the value of the "id" attribute.
|
| void | setId (std::string_view id) |
| | Set the element id, the value of the "id" attribute.
|
|
RcString | className () const |
| | Get the element class name, the value of the "class" attribute.
|
| void | setClassName (std::string_view name) |
| | Set the element class name, the value of the "class" attribute.
|
| void | setStyle (std::string_view style) |
| | Set the element style, the value of the "style" attribute.
|
| void | updateStyle (std::string_view style) |
| | Update the element style, adding new attributes or overridding existing ones (without removing them).
|
| ParseResult< bool > | trySetPresentationAttribute (std::string_view name, std::string_view value) |
| | Set the value of a presentation attribute, such as "fill" or "stroke".
|
| bool | hasAttribute (const xml::XMLQualifiedNameRef &name) const |
| | Returns true if the element has an attribute with the given name.
|
| std::optional< RcString > | getAttribute (const xml::XMLQualifiedNameRef &name) const |
| | Get the value of an attribute, if it exists.
|
| SmallVector< xml::XMLQualifiedNameRef, 1 > | findMatchingAttributes (const xml::XMLQualifiedNameRef &matcher) const |
| | Find attributes matching the given name matcher.
|
| void | setAttribute (const xml::XMLQualifiedNameRef &name, std::string_view value) |
| | Set the value of a generic XML attribute, which may be either a presentation attribute or custom user-provided attribute.
|
| void | removeAttribute (const xml::XMLQualifiedNameRef &name) |
| | Remove an attribute, which may be either a presentation attribute or custom user-provided attribute.
|
|
SVGDocument | ownerDocument () |
| | Get an owning reference to the SVGDocument containing this element.
|
| std::optional< SVGElement > | parentElement () const |
| | Get this element's parent, if it exists.
|
| std::optional< SVGElement > | firstChild () const |
| | Get the first child of this element, if it exists.
|
| std::optional< SVGElement > | lastChild () const |
| | Get the last child of this element, if it exists.
|
| std::optional< SVGElement > | previousSibling () const |
| | Get the previous sibling of this element, if it exists.
|
| std::optional< SVGElement > | nextSibling () const |
| | Get the next sibling of this element, if it exists.
|
| void | insertBefore (const SVGElement &newNode, std::optional< SVGElement > referenceNode) |
| | Insert newNode as a child, before referenceNode.
|
| void | appendChild (const SVGElement &child) |
| | Append child as a child of the current node.
|
| void | replaceChild (const SVGElement &newChild, const SVGElement &oldChild) |
| | Replace oldChild with newChild in the tree, removing oldChild and inserting newChild in its place.
|
| void | removeChild (const SVGElement &child) |
| | Remove child from this node.
|
| void | remove () |
| | Remove this node from its parent, if it has one.
|
|
bool | operator== (const SVGElement &other) const |
| | Returns true if the two SVGElement handles reference the same underlying document.
|
|
bool | operator!= (const SVGElement &other) const |
| | Returns true if the two SVGElement handles reference the same underlying document.
|
| template<typename Derived> |
| bool | isa () const |
| | Return true if this element "is a" instance of type, if it be cast to a specific type with cast.
|
| template<typename Derived> |
| Derived | cast () |
| | Cast this element to its derived type.
|
| template<typename Derived> |
| Derived | cast () const |
| | Cast this element to its derived type (const version).
|
| template<typename Derived> |
| std::optional< Derived > | tryCast () |
| | Cast this element to its derived type, if possible.
|
| template<typename Derived> |
| std::optional< const Derived > | tryCast () const |
| | Cast this element to its derived type, if possible.
|
| std::optional< SVGElement > | querySelector (std::string_view selector) |
| | Find the first element in the tree that matches the given CSS selector.
|
|
const PropertyRegistry & | getComputedStyle () const |
| | Get the computed CSS style of this element, after the CSS cascade.
|
DOM object for a "<marker>" element, which is used to define graphical objects that can be used repeatedly along a path, such as arrowheads or other markers on paths.