pub fn canvas_gradient(
x: f32,
y: f32,
w: f32,
h: f32,
kind: u32,
ax: f32,
ay: f32,
bx: f32,
by: f32,
stops: &[(f32, u8, u8, u8, u8)],
)Expand description
Draw a gradient-filled rectangle.
kind: GRADIENT_LINEAR or GRADIENT_RADIAL.
For linear gradients, (ax,ay) and (bx,by) define the gradient axis.
For radial gradients, (ax,ay) is the center and by is the radius.
stops is a slice of (offset, r, g, b, a) tuples.