OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <!-- Test based on that found at | 2 <!-- Test based on that found at |
3 http://philip.html5.org/tests/canvas/suite/tests/index.2d.transformation.tr
ansform.html | 3 http://philip.html5.org/tests/canvas/suite/tests/index.2d.transformation.tr
ansform.html |
4 --> | 4 --> |
5 <title>Canvas test: 2d.transformation.transform.multiply</title> | 5 <title>Canvas test: 2d.transformation.transform.multiply</title> |
6 <canvas id="canvas" class="output" width="100" height="100"><p class="fallback">
FAIL (fallback content)</p></canvas> | 6 <canvas id="canvas" class="output" width="100" height="100"><p class="fallback">
FAIL (fallback content)</p></canvas> |
7 <script> | 7 <script> |
8 if (window.testRunner) | 8 if (window.testRunner) |
9 testRunner.dumpAsText(true); | 9 testRunner.dumpAsTextWithPixelResults(); |
10 | 10 |
11 var ctx = document.getElementById("canvas").getContext("2d"); | 11 var ctx = document.getElementById("canvas").getContext("2d"); |
12 ctx.fillStyle = '#f00'; | 12 ctx.fillStyle = '#f00'; |
13 ctx.fillRect(0, 0, 100, 100); | 13 ctx.fillRect(0, 0, 100, 100); |
14 | 14 |
15 ctx.transform(1,2, 3,4, 5,6); | 15 ctx.transform(1,2, 3,4, 5,6); |
16 ctx.transform(-2,1, 3/2,-1/2, 1,-2); | 16 ctx.transform(-2,1, 3/2,-1/2, 1,-2); |
17 ctx.fillStyle = '#0f0'; | 17 ctx.fillStyle = '#0f0'; |
18 ctx.fillRect(0, 0, 100, 100); | 18 ctx.fillRect(0, 0, 100, 100); |
19 </script> | 19 </script> |
OLD | NEW |