|
|
Donner
C++20 SVG rendering library
|
Contains properties the style="" attribute for an element, local to the element. More...
#include "donner/svg/components/style/StyleComponent.h"
Public Member Functions | |
| void | setStyle (std::string_view style) |
| Sets the properties from the value of the element's style="" attribute. | |
| void | updateStyle (std::string_view style) |
| Updates the properties from the value of the element's style="" attribute, adding new properties or updating existing ones. | |
| ParseResult< bool > | trySetPresentationAttribute (EntityHandle handle, std::string_view name, std::string_view value) |
| Tries to set a presentation attribute on the given entity. | |
Public Attributes | |
| PropertyRegistry | properties |
| The properties of the element, which are parsed from the style="" attribute. | |
Contains properties the style="" attribute for an element, local to the element.
This is used during the CSS cascade, which stores the final element style in ComputedStyleComponent.
|
inline |
Sets the properties from the value of the element's style="" attribute.
Note that this applies the style additively, and does not invalidate the existing style.
| style | The value of the style attribute. |
Sets the properties from the value of the element's style="" attribute. Note that this first invalidates the previous style="" values and replaces them.
| style | The value of the style attribute. |
|
inline |
Tries to set a presentation attribute on the given entity.
This is used during the CSS cascade to apply the computed style to the element.
| handle | The entity to set the attribute on. |
| name | The name of the attribute. |
| value | The value of the attribute. |
true if the attribute was set, false if the attribute was not recognized.
|
inline |
Updates the properties from the value of the element's style="" attribute, adding new properties or updating existing ones.
Does not remove existing style="" attribute information.
| style | The update style to apply, as a CSS style string (e.g. "fill:red;"). |