class CanvasRenderingContext2D
Package :
(default package)
Description :
As Graphics uses functions, we need to add functions to the context native class to replace assignments.
Methods :
new()
Creates a new CanvasRenderingContext2D object.
beginFill(color)
Equivalent to setting fillStyle
Parameters :
- color : The color to fill with.
lineStyle(color)
Equivalent to setting strokeStyle
Parameters :
- color : The color to stroke with.
shadow(color, blur, x, y)
Setting the shadow style
Parameters :
- color : The shadow color
- blur : The shadow blur
- x : The shadow's x offset
- y : The shadow's y offset
textStyle(color, align, baseline, font)
Parameters :
- color :
- align :
- baseline :
- font :