CanvasGradient

CanvasGradient

The CanvasGradient interface represents an opaque object describing a gradient. It is returned by the methods Canvas.createLinearGradient() or Canvas.createRadialGradient().

It can be used as a fillStyle or strokeStyle.

Methods

addColorStop()

See:

Adds a new color stop, defined by an offset and a color, to a given canvas gradient.