blob: 23515a757d4b343f96af6ceea36ef840af85b51c [file] [log] [blame]
If this renders correctly you should see one big friendly green square.
<canvas id="canvas" width="200" height="200" ></canvas>
<script>
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
context.fillStyle = 'red';
context.fillRect(0,0,200,200);
context.fillStyle = 'green';
context.fillRect(50,50,100,100);
context.drawImage(canvas, 50, 50, 100, 100, 0, 0, 200, 200);
</script>