Expand description
Gradient span generator and gradient functions.
Port of agg_span_gradient.h — provides gradient shape functions
(linear, radial, diamond, conic, etc.) and the main SpanGradient
generator that combines an interpolator, gradient function, and color
function to produce gradient-colored spans.
Structs§
- Gradient
Conic - Conic (angular) gradient: |atan2(y,x)| * d / pi.
- Gradient
Diamond - Diamond-shaped gradient: max(|x|, |y|).
- Gradient
Radial - Radial gradient using fast integer square root.
- Gradient
RadialD - Radial gradient using f64 square root (higher precision).
- Gradient
Radial Focus - Radial gradient with an off-center focal point.
- Gradient
Reflect Adaptor - Reflecting gradient adaptor — mirrors gradient values at boundaries.
- Gradient
Repeat Adaptor - Repeating gradient adaptor — wraps gradient values with modulo.
- Gradient
SqrtXY - Square-root XY gradient: sqrt(|x|*|y|).
- GradientX
- Linear gradient along the X axis.
- GradientXY
- XY gradient: |x|*|y| / d.
- GradientY
- Linear gradient along the Y axis.
- Span
Gradient - Main gradient span generator.
Constants§
Traits§
- Gradient
Function - Trait for gradient shape functions.