| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript"> | 3 <script type="text/javascript"> |
| 4 if (window.testRunner) | 4 if (window.testRunner) |
| 5 testRunner.dumpAsText(true); | 5 testRunner.dumpAsTextWithPixelResults(); |
| 6 | 6 |
| 7 function main() { | 7 function main() { |
| 8 var g = document.getElementById("c").getContext("2d"); | 8 var g = document.getElementById("c").getContext("2d"); |
| 9 g.beginPath(); | 9 g.beginPath(); |
| 10 g.moveTo(50, 0); | 10 g.moveTo(50, 0); |
| 11 g.lineTo(50,100); | 11 g.lineTo(50,100); |
| 12 g.translate(50, 50); | 12 g.translate(50, 50); |
| 13 g.rotate(0.5*3.1415); | 13 g.rotate(0.5*3.1415); |
| 14 g.translate(-50, -50); | 14 g.translate(-50, -50); |
| 15 g.moveTo(50, 0); | 15 g.moveTo(50, 0); |
| 16 g.lineTo(50,100); | 16 g.lineTo(50,100); |
| 17 g.stroke(); | 17 g.stroke(); |
| 18 } | 18 } |
| 19 </script> | 19 </script> |
| 20 </head> | 20 </head> |
| 21 <body onload="main();"> | 21 <body onload="main();"> |
| 22 <canvas id="c" width="100" height="100" style="background: green"></canvas> | 22 <canvas id="c" width="100" height="100" style="background: green"></canvas> |
| 23 <div>This tests that transforms applied to a canvas, are correctly applied t
o the stroke path defined in the context. <br> The above image should be a green
square divided into quarters by two black lines.</div> | 23 <div>This tests that transforms applied to a canvas, are correctly applied t
o the stroke path defined in the context. <br> The above image should be a green
square divided into quarters by two black lines.</div> |
| 24 </body> | 24 </body> |
| 25 </html> | 25 </html> |
| OLD | NEW |