It would be useful if CanvasGradient allowed specifying a spread method, which determines how the gradient is rendered outside the [0.0, 1.0] stop range:
Pad (current default, gradient stop is clamped to [0.0, 1.0])
Repeat (gradient repeats in the same order past the edges, i.e. colors at [1.0, 2.0] would be the same as [0.0, 1.0]
Reflect (gradient colors repeat in reverse past the edges, i.e. colors at [1.0, 2.0] would be the reverse of [0.0, 1.0]
This would give canvas parity with spreadMethod in SVG and SpreadMethod going back to Flash.
It would be useful if
CanvasGradientallowed specifying a spread method, which determines how the gradient is rendered outside the [0.0, 1.0] stop range:Pad(current default, gradient stop is clamped to [0.0, 1.0])Repeat(gradient repeats in the same order past the edges, i.e. colors at [1.0, 2.0] would be the same as [0.0, 1.0]Reflect(gradient colors repeat in reverse past the edges, i.e. colors at [1.0, 2.0] would be the reverse of [0.0, 1.0]This would give canvas parity with
spreadMethodin SVG andSpreadMethodgoing back to Flash.