Documentation
Learn all about jCanvasjCanvas
Canvas
- Clear Canvas
- Rotate Canvas
- Scale Canvas
- Translate Canvas
- Pixel Manipulation
- Get Canvas Image
- Draw Manually
- Detect Pixel Ratio
Drawings
Layers
Events
Styles
Drawing layers
The drawLayers()
method clears the canvas, and draws the canvas’s layers.
$('canvas').drawLayers();
As of v20.2.0, You can also specify a complete
callback to run when all layers have been drawn. This can be useful if you have any image layers because jCanvas would normally wait for those images to load asynchronously before continuing to draw other layers.
$('canvas').drawLayers({
complete: function () {
console.log('done!');
}
});