Canvas Reference Flashcards
fillStyle
Sets or returns the color, gradient, or pattern used to fill the drawing
strokeStyle
Sets or returns the color, gradient, or pattern used for strokes
shadowColor
Sets or returns the color to use for shadows
shadowBlur
Sets or returns the blur level for shadows
shadowOffsetX
Sets or returns the horizontal distance of the shadow from the shape
shadowOffsetY
Sets or returns the vertical distance of the shadow from the shape
createLinearGradient()
Creates a linear gradient (to use on canvas content)
createPattern()
Repeats a specified element in the specified direction
createRadialGradient()
Creates a radial/circular gradient (to use on canvas content)
addColorStop()
Specifies the colors and stop positions in a gradient object
lineCap
Sets or returns the style of the end caps for a line
lineJoin
Sets or returns the type of corner created, when two lines meet
lineWidth
Sets or returns the current line width
miterLimit
Sets or returns the maximum miter length
rect()
Creates a rectangle
fillRect()
Draws a “filled” rectangle
strokeRect()
Draws a rectangle (no fill)
clearRect()
Clears the specified pixels within a given rectangle
fill()
Fills the current drawing (path)
stroke()
Actually draws the path you have defined