Module gradient

Source
Expand description

Gradient paint servers; the linearGradient and radialGradient elements.

Macrosยง

impl_gradient ๐Ÿ”’

Structsยง

ColorStop
Contents of a <stop> element for gradient color stops
Common ๐Ÿ”’
Fields shared by all gradient nodes
GradientUnits
LinearGradient
Node for the <linearGradient> element
RadialGradient
Node for the <radialGradient> element
ResolvedGradient
Resolved gradient; this is memoizable after the initial resolution.
Stop
Node for the <stop> element
Unresolved ๐Ÿ”’
State used during the gradient resolution process
UnresolvedGradient ๐Ÿ”’
Main structure used during gradient resolution. For unresolved gradients, we store all fields as Option<T> - if None, it means that the field is not specified; if Some(T), it means that the field was specified.
UserSpaceGradient
Gradient normalized to user-space units.

Enumsยง

GradientVariant
Parameters specific to each gradient type, after normalizing to user-space units.
ResolvedGradientVariant ๐Ÿ”’
Parameters specific to each gradient type, after resolving.
SpreadMethod
spreadMethod attribute for gradients
UnresolvedVariant ๐Ÿ”’
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.