CanvasGradient

Availability

BlackBerry Desktop Software 6.0 or later

The CanvasGradient object represents a linear or radial gradient definition that is used for fills and strokes. CanvasGradient objects are created using CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient() .

Methods

Method name

Description

Support level

Availability

addColorStop()

Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.

HTML 5

6.0 or later

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus