Collection of methods to draw on canvas.
This will return the 2D context of the main canvas element.
The value returned from Crafty.canvas._canvas.getContext('2d')
.
public void Crafty.canvas.init(void)
Crafty.support.canvas
is falseCreates a canvas
element inside Crafty.stage.elem
. Must be called
before any entities with the Canvas component can be drawn.
This method will automatically be called if no Crafty.canvas.context
is
found.