25.8. CanvasGradient: a color gradient for use in a canvasFirefox 1.5, Safari 1.3, Opera 9: Object CanvasGradient25.8.1. Methods
25.8.2. DescriptionA CanvasGradient object represents a color gradient that may be assigned to both the strokeStyle and fillStyle properties of a CanvasRenderingContext2D object. The createLinearGradient( ) and createRadialGradient( ) methods of CanvasRenderingContext2D both return CanvasGradient objects. Once you have created a CanvasGradient object, use addColorStop( ) to specify what colors should appear at what positions within the gradient. Between the positions you specify, colors are interpolated to create a smooth gradient or fade. Transparent black stops are created implicitly at the start and end points of the gradient. 25.8.3. See Also
|