| <html> |
| <head> |
| <script type="text/javascript"> |
| if (window.testRunner) |
| testRunner.dumpAsText(true); |
| |
| function main() { |
| var g = document.getElementById("c").getContext("2d"); |
| g.beginPath(); |
| g.moveTo(50, 0); |
| g.lineTo(50,100); |
| g.translate(50, 50); |
| g.rotate(0.5*3.1415); |
| g.translate(-50, -50); |
| g.moveTo(50, 0); |
| g.lineTo(50,100); |
| g.stroke(); |
| } |
| </script> |
| </head> |
| <body onload="main();"> |
| <canvas id="c" width="100" height="100" style="background: green"></canvas> |
| <div>This tests that transforms applied to a canvas, are correctly applied to the stroke path defined in the context. <br> The above image should be a green square divided into quarters by two black lines.</div> |
| </body> |
| </html> |