Help Center

Local Navigation

Object: CanvasGradient

Availability

BlackBerry® Device 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().

CanvasGradient 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


Was this information helpful? Send us your comments.