|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Parameters for a radial gradient fill at the Geode drawing layer. More...
#include "donner/svg/renderer/geode/GeoEncoder.h"
Public Types | |
| using | Stop = LinearGradientParams::Stop |
| Gradient stops. Same wire format / cap as LinearGradientParams — kept as a sibling struct so each gradient kind's C++ API reflects its natural parameter set without std::variant-style dispatch. | |
Public Attributes | |
| Vector2d | center = Vector2d::Zero() |
| Outer circle center in gradient space. | |
| Vector2d | focalCenter = Vector2d::Zero() |
| Focal circle center in gradient space. Typically equals center unless the gradient has a distinct focal point (fx/fy). | |
| double | radius = 0.0 |
| Outer circle radius. Must be > 0. | |
| double | focalRadius = 0.0 |
| Focal circle radius (SVG 2 fr attribute). Typically 0. | |
| Transform2d | gradientFromPath |
| Same as LinearGradientParams::gradientFromPath. | |
| uint32_t | spreadMode = 0 |
| Spread mode. 0 = pad, 1 = reflect, 2 = repeat. | |
| std::span< const Stop > | stops |
| Gradient stops (capped at 16 entries by the underlying uniform buffer). | |
Parameters for a radial gradient fill at the Geode drawing layer.
Describes a two-circle radial gradient: an outer circle (center, radius) and a focal circle (focalCenter, focalRadius). When focalCenter == center and focalRadius == 0, this reduces to the simple one-circle radial gradient (t = distance(P, center) / radius).
All geometry fields are in the gradient's own coordinate system, same convention as LinearGradientParams — the caller has already folded gradientUnits and gradientTransform into gradientFromPath.
Gradient stops. Same wire format / cap as LinearGradientParams — kept as a sibling struct so each gradient kind's C++ API reflects its natural parameter set without std::variant-style dispatch.
| Vector2d donner::geode::RadialGradientParams::center = Vector2d::Zero() |
Outer circle center in gradient space.
| Vector2d donner::geode::RadialGradientParams::focalCenter = Vector2d::Zero() |
Focal circle center in gradient space. Typically equals center unless the gradient has a distinct focal point (fx/fy).
| double donner::geode::RadialGradientParams::focalRadius = 0.0 |
Focal circle radius (SVG 2 fr attribute). Typically 0.
| Transform2d donner::geode::RadialGradientParams::gradientFromPath |
| double donner::geode::RadialGradientParams::radius = 0.0 |
Outer circle radius. Must be > 0.
| uint32_t donner::geode::RadialGradientParams::spreadMode = 0 |
Spread mode. 0 = pad, 1 = reflect, 2 = repeat.
| std::span<const Stop> donner::geode::RadialGradientParams::stops |
Gradient stops (capped at 16 entries by the underlying uniform buffer).