Mercurial > defr > drupal > scald > dnd
comparison js/bt/other_libs/excanvas_0002/testcases/arc.html @ 18:0d557e6e73f7
Added beautytips and some additional event handling code to the library.
| author | David Eads <eads@chicagotech.org> |
|---|---|
| date | Fri, 06 Mar 2009 14:11:46 -0600 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 17:1a77f87927dd | 18:0d557e6e73f7 |
|---|---|
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Arc Test</title> | |
| 5 <style> | |
| 6 | |
| 7 body { | |
| 8 text-align: center | |
| 9 } | |
| 10 | |
| 11 </style> | |
| 12 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]--> | |
| 13 <script> | |
| 14 | |
| 15 window.onload = function() { | |
| 16 var ctx = document.getElementById('c').getContext('2d'); | |
| 17 | |
| 18 ctx.beginPath(); | |
| 19 ctx.arc(25, 25, 20, 0, Math.PI, false); | |
| 20 ctx.stroke(); | |
| 21 | |
| 22 ctx.save(); | |
| 23 ctx.scale(0.5, 0.5); | |
| 24 ctx.beginPath(); | |
| 25 ctx.arc(75, 25, 20, 0, Math.PI * 2, false); | |
| 26 ctx.stroke(); | |
| 27 ctx.restore(); | |
| 28 | |
| 29 ctx.beginPath(); | |
| 30 ctx.arc(25, 75, 20, 0, Math.PI, true); | |
| 31 ctx.stroke(); | |
| 32 | |
| 33 ctx.beginPath(); | |
| 34 ctx.arc(75, 75, 20, 0, Math.PI * 2, true); | |
| 35 ctx.stroke(); | |
| 36 | |
| 37 }; | |
| 38 | |
| 39 </script> | |
| 40 </head> | |
| 41 <body> | |
| 42 | |
| 43 <canvas id=c width=200 height=100></canvas> | |
| 44 | |
| 45 <p>This tests that drawing arches work in the same way in different | |
| 46 browsers.</p> | |
| 47 | |
| 48 </body> | |
| 49 </html> |
