- gradient <-
kind: {linear,radial}
- Whether the gradient interpolates along a straight axis (
linear)
or between two circles (radial). Fixed at construction —
build a fresh gradient to change kind.
- gradient <-
p0: point
- Start point of the axis (linear) or centre of the start-circle (radial).
- gradient <-
p1: point
- End point of the axis (linear) or centre of the end-circle (radial). For
an axis-aligned linear gradient set gradient
<-p0
and
gradient<-p1
to the two corners of the shape; the perpendicular component is unused.
- gradient <-
r0: num*
- Radius of the start-circle for a radial gradient. @nil
(the default for a linear gradient) is treated as zero at draw time.
- gradient <-
r1: num*
- Radius of the end-circle for a radial gradient. @nil
(the default for a linear gradient) is treated as zero at draw time.
- gradient <-
stops: chain
- Chain of
tuple(fraction, colour) — the colour stops.
Fractions are numbers in 0..1 (values outside are silently clamped by
the renderer); the chain need not be sorted but the visual result
depends on stop order for repeated fractions. Empty chains render as
fully transparent.