|
|
Donner
C++20 SVG rendering library
|
Computed properties for a "<radialGradient>" element. More...
#include "donner/svg/components/paint/RadialGradientComponent.h"
Public Member Functions | |
| void | inheritAttributes (EntityHandle handle, EntityHandle base) |
Inherit unset attributes from entity base. | |
Public Attributes | |
| Lengthd | cx = Lengthd(50, Lengthd::Unit::Percent) |
| The x-coordinate of the gradient center, defaults to 50%. | |
| Lengthd | cy = Lengthd(50, Lengthd::Unit::Percent) |
| The y-coordinate of the gradient center, defaults to 50%. | |
| Lengthd | r = Lengthd(50, Lengthd::Unit::Percent) |
| The radius of the gradient, defaults to 50%. | |
| std::optional< Lengthd > | fx |
| The x-coordinate of the gradient focus point, defaults to cx. | |
| std::optional< Lengthd > | fy |
| The y-coordinate of the gradient focus point, defaults to cy. | |
| Lengthd | fr = Lengthd(0, Lengthd::Unit::Percent) |
| The radius of the gradient focus point, defaults to 0%. | |
Computed properties for a "<radialGradient>" element.
This is used to store the resolved properties, replacing unset values with defaults and inheriting from parent elements.
For fx and fy, if they are not specified they will coincide with cx cy, see https://www.w3.org/TR/SVG2/pservers.html#RadialGradientElementFXAttribute. Represent this by using std::nullopt, which will be resolved to cx/cy at the time of rendering.
| void donner::svg::components::ComputedRadialGradientComponent::inheritAttributes | ( | EntityHandle | handle, |
| EntityHandle | base ) |
Inherit unset attributes from entity base.
| handle | Current entity to modify. |
| base | The entity to inherit unset attributes from. |