MENU
Filling
fillStyle stores the internal filling style, which can be a solid color, a gradient, or a pattern.
fill() initiates the actual filling according to 'fillStyle'.
createLinearGradient(x1,y1,x2,y2) creates a linear gradient object to be used by 'fillStyle', starting from (x1,y1) and ending at (x2,y2).
createRadialGradient(x1,y1,r1,x2,y2,r2) creates a circular gradient object to be used by 'fillStyle', starting from the circle defined by (x1,y1,r1), ending at the circle defined by (x2,y2,r2).
gradient.addColorStop(stop,color) specifies the color at a position in the gradient object. 'stop' must be between 0.0 and 1.0.
createPattern(image, rep) loads an image and tile it in the interior, to be used by 'fillStyle'. 'rep' can be 'repeat', 'repeat-x', 'repeat-y', or 'no-repeat'.