canvas-drawImage-transform-restored-ref.html (421B)
1 <html> 2 <head> 3 <script type="text/javascript"> 4 function go() { 5 var canvas = document.getElementById("canvas"); 6 var ctx = canvas.getContext("2d"); 7 8 ctx.setTransform(2, 0, 0, 2, 0, 0); 9 10 ctx.fillStyle = "blue"; 11 ctx.fillRect(20, 20, 50, 50); 12 } 13 </script> 14 </head> 15 <body onload="go()"> 16 <canvas id="canvas" width="200" height="200"></canvas> 17 </body> 18 </html>