annotate 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
rev   line source
eads@18 1 <!DOCTYPE html>
eads@18 2 <html>
eads@18 3 <head>
eads@18 4 <title>Arc Test</title>
eads@18 5 <style>
eads@18 6
eads@18 7 body {
eads@18 8 text-align: center
eads@18 9 }
eads@18 10
eads@18 11 </style>
eads@18 12 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->
eads@18 13 <script>
eads@18 14
eads@18 15 window.onload = function() {
eads@18 16 var ctx = document.getElementById('c').getContext('2d');
eads@18 17
eads@18 18 ctx.beginPath();
eads@18 19 ctx.arc(25, 25, 20, 0, Math.PI, false);
eads@18 20 ctx.stroke();
eads@18 21
eads@18 22 ctx.save();
eads@18 23 ctx.scale(0.5, 0.5);
eads@18 24 ctx.beginPath();
eads@18 25 ctx.arc(75, 25, 20, 0, Math.PI * 2, false);
eads@18 26 ctx.stroke();
eads@18 27 ctx.restore();
eads@18 28
eads@18 29 ctx.beginPath();
eads@18 30 ctx.arc(25, 75, 20, 0, Math.PI, true);
eads@18 31 ctx.stroke();
eads@18 32
eads@18 33 ctx.beginPath();
eads@18 34 ctx.arc(75, 75, 20, 0, Math.PI * 2, true);
eads@18 35 ctx.stroke();
eads@18 36
eads@18 37 };
eads@18 38
eads@18 39 </script>
eads@18 40 </head>
eads@18 41 <body>
eads@18 42
eads@18 43 <canvas id=c width=200 height=100></canvas>
eads@18 44
eads@18 45 <p>This tests that drawing arches work in the same way in different
eads@18 46 browsers.</p>
eads@18 47
eads@18 48 </body>
eads@18 49 </html>