|
|
Donner
C++20 SVG rendering library
|
Parameters for a property parse function. More...
#include "donner/svg/properties/PropertyParsing.h"
Public Member Functions | |
| std::span< const css::ComponentValue > | components () const |
| Get the list of css::ComponentValue for the property value. | |
| bool | allowUserUnits () const |
| Returns true if user units are allowed for the property. | |
Static Public Member Functions | |
| static PropertyParseFnParams | Create (const css::Declaration &declaration, css::Specificity specificity, PropertyParseBehavior parseBehavior=PropertyParseBehavior::Default) |
| Create a new PropertyParseFnParams from a declaration and specificity. | |
| static PropertyParseFnParams | CreateForAttribute (std::string_view value) |
| Create a new PropertyParseFnParams from a declaration and specificity. | |
Public Attributes | |
| std::variant< std::string_view, std::span< const css::ComponentValue > > | valueOrComponents |
| Property value, which may either be a string or list of css::ComponentValue. | |
| PropertyState | explicitState = PropertyState::NotSet |
| Explicit state of the property, such as "inherit", "initial" or "unset". If this is PropertyState::NotSet, ignore this field and parse valueOrComponents. | |
| css::Specificity | specificity |
| Specificity of the property, used for inheritance. | |
| PropertyParseBehavior | parseBehavior = PropertyParseBehavior::Default |
| For presentation attributes, values may be unitless, in which case they the spec says they are specified in "user units". See https://www.w3.org/TR/SVG2/types.html#syntax. | |
Parameters for a property parse function.
|
static |
Create a new PropertyParseFnParams from a declaration and specificity.
| declaration | CSS declaration, e.g. "transform: translate(10px, 20px);". |
| specificity | Specificity of the declaration. |
| parseBehavior | Behavior for parsing numbers. See PropertyParseBehavior. |
|
static |
Create a new PropertyParseFnParams from a declaration and specificity.
| value | Presentation attribute value, e.g. "translate(10px, 20px)". |