|
|
Donner
C++20 SVG rendering library
|
Created by PaintSystem during render tree instantiation. More...
#include "donner/svg/components/paint/GradientComponent.h"
Public Member Functions | |
| void | inheritAttributesFrom (EntityHandle handle, EntityHandle base) |
| Resolve unspecified attributes to default values or inherit from the given base gradient element. | |
Public Attributes | |
| bool | initialized = false |
| True if this component has been initialized (it has two-phase construction). If this is false, all other fields of this component will be invalid. | |
| GradientUnits | gradientUnits = GradientUnits::Default |
| Resolved value of the "gradientsUnits" attribute, considering inheritance and the default value fallback. | |
| GradientSpreadMethod | spreadMethod = GradientSpreadMethod::Default |
| Resolved value of the "spreadMethod" attribute, considering inheritance and the default value fallback. | |
| std::vector< GradientStop > | stops |
| Parsed gradient stops from "<stop>" child elements. | |
Created by PaintSystem during render tree instantiation.
Since this component may instantiate dependencies on construction, it constructs with two-phase initialization.
Upon construction, fields are initialized to default values. The initialize method must be called to complete initialization.
To construct this object, call PaintSystem::instantiateAllComputedComponents.
| void donner::svg::components::ComputedGradientComponent::inheritAttributesFrom | ( | EntityHandle | handle, |
| EntityHandle | base ) |
Resolve unspecified attributes to default values or inherit from the given base gradient element.
This method is used to propagate attributes such as x1, y1, cx, cy, r, etc from the base element to the current element.
| handle | Current entity handle attached to this component. |
| base | Base entity handle to inherit from, if any. If no base is specified, unspecified attributes are resolved to default values. |