Expand description
Gradient paint servers; the linearGradient
and radialGradient
elements.
Macrosยง
- impl_
gradient ๐
Structsยง
- Color
Stop - Contents of a
<stop>
element for gradient color stops - Common ๐
- Fields shared by all gradient nodes
- Gradient
Units - Linear
Gradient - Node for the
<linearGradient>
element - Radial
Gradient - Node for the
<radialGradient>
element - Resolved
Gradient - Resolved gradient; this is memoizable after the initial resolution.
- Stop
- Node for the
<stop>
element - Unresolved ๐
- State used during the gradient resolution process
- Unresolved
Gradient ๐ - Main structure used during gradient resolution. For unresolved
gradients, we store all fields as
Option<T>
- ifNone
, it means that the field is not specified; ifSome(T)
, it means that the field was specified. - User
Space Gradient - Gradient normalized to user-space units.
Enumsยง
- Gradient
Variant - Parameters specific to each gradient type, after normalizing to user-space units.
- Resolved
Gradient ๐Variant - Parameters specific to each gradient type, after resolving.
- Spread
Method - spreadMethod attribute for gradients
- Unresolved
Variant ๐ - Parameters specific to each gradient type, before being resolved.
These will be composed together with UnreseolvedVariant from fallback
nodes (referenced with e.g.
<linearGradient xlink:href="#fallback">
) to form a final, resolved Variant.