1 <p>If this renders correctly you should see one big friendly green square.
</p>
2 <canvas id=
"canvas" width=
"200" height=
"200" ></canvas>
3 <canvas id=
"canvas2" width=
"200" height=
"200" style=
"display:none" ></canvas>
5 var canvas
= document
.getElementById("canvas");
6 var canvas2
= document
.getElementById("canvas2");
7 var context
= canvas
.getContext("2d");
8 var context2
= canvas2
.getContext("2d");
9 context2
.fillStyle
= 'red';
10 context2
.fillRect(0,0,200,200);
11 context2
.fillStyle
= 'green';
12 context2
.fillRect(50,50,100,100);
13 context
.imageSmoothingEnabled
= false;
14 context
.drawImage(canvas2
, 50, 50, 100, 100, 0, 0, 200, 200);