|
|
Donner
C++20 SVG rendering library
|
Defines the paint server for a linear gradients.
These elements are typically placed within a <defs> element, and then referenced by id from a fill or stroke attribute.
To reference it with a fill:
Valid child elements: "<stop>"
| Attribute | Default | Description |
|---|---|---|
| x1 | 0% | Start X coordinate. |
| y1 | 0% | Start Y coordinate. |
| x2 | 100% | End X coordinate. |
| y2 | 100% | End Y coordinate. |
| gradientUnits | objectBoundingBox | The coordinate system for the gradient, either userSpaceOnUse or objectBoundingBox. |
| gradientTransform | (none) | A transform to apply to the gradient. |
| spreadMethod | pad | How to handle colors outside the gradient. Either pad, reflect, or repeat. |
| href | (none) | A URL reference to a template gradient element, which is then used as a template for this gradient. Example: <linearGradient id="MyGradient" href="#MyGradient2" /> |