December 2010
Intermediate to advanced
110 pages
2h 31m
English
CRC.createLinearGradient() — create a linear color gradient
CanvasGradient createLinearGradient(floatxStart, floatyStart, floatxEnd, floatyEnd)
xStart, yStartThe coordinates of the gradient’s start point
xEnd, yEndThe coordinates of the gradient’s endpoint
A CanvasGradient object representing a linear color gradient.
This method creates and returns a new CanvasGradient object that
linearly interpolates colors between the specified start point and
endpoint. Note that this method does not specify any colors for the
gradient. Use the addColorStop() method of the
returned object to do that. To stroke lines or fill areas using a
gradient, assign a CanvasGradient
object to the strokeStyle or
fillStyle properties.
Read now
Unlock full access