HTML5: Is building this possible?
HTML5: Is building this possible?
Out of context: Reply #9
- Started
- Last post
- 11 Responses
- monNom0
Ponyboy: you can stack canvases to create 'layers' (position:absolute, z-index: 1,2,3, etc.). Once happy with the result, you read the bitmap data from the canvas and use a composite operation to draw to your base canvas.
var canvas1 = $('canvas2');
var canvas2 = $('canvas2');
var ctx1 = canvas1.getContext('2d');
ctx1.globalCompositeOperation="s...
ctx1.drawImage(canvas2,0,0);When you're done, you can pull the data with
dataToURL('img/png');