ctm-1.html 468 B

12345678910111213141516171819
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. window.onload = function() {
  5. var ctx = document.getElementById("c1").getContext("2d");
  6. ctx.mozCurrentTransform = [ 10, 0, 0, 1, 0, 0 ];
  7. ctx.fillRect(1, 1, 10, 10);
  8. ctx.mozCurrentTransformInverse = [ 1, 0, 0, .1, 0, 0 ];
  9. ctx.fillRect(150, 1, 10, 10);
  10. }
  11. </script>
  12. </head>
  13. <body style="padding: 0px; margin: 0px;">
  14. <div><canvas id="c1" width="300" height="300"></canvas></div>
  15. </body>
  16. </html>