annotate js/bt/other_libs/excanvas_0002/testcases/quadraticcurve.html @ 35:abc9d39cfbe9

Switch the trigger from mouseover to click. MouseOver is problematic if people want to interact with the content of the popup, for example to click the play button of an swf player.
author Franck Deroche <franck@defr.org>
date Fri, 18 Sep 2009 15:11:03 +0200
parents 0d557e6e73f7
children
rev   line source
eads@18 1 <!DOCTYPE html>
eads@18 2 <html>
eads@18 3 <head>
eads@18 4 <title>Quadratic Curve 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.strokeStyle = 'black';
eads@18 19 ctx.lineWidth = 1;
eads@18 20 ctx.beginPath();
eads@18 21 ctx.moveTo(50, 50);
eads@18 22 ctx.quadraticCurveTo(0, 0, 25, 75);
eads@18 23 ctx.quadraticCurveTo(50, 0, 50, 50);
eads@18 24 ctx.stroke();
eads@18 25 };
eads@18 26
eads@18 27 </script>
eads@18 28 </head>
eads@18 29 <body>
eads@18 30
eads@18 31 <canvas id=c width=100 height=100></canvas>
eads@18 32
eads@18 33 <p>This tests that drawing quadratic curves work in the same way in different
eads@18 34 browsers.</p>
eads@18 35
eads@18 36 </body>
eads@18 37 </html>
eads@18 38 <!DOCTYPE html>
eads@18 39 <html>
eads@18 40 <head>
eads@18 41 <title>Quadratic Curve Test</title>
eads@18 42 <style>
eads@18 43
eads@18 44 body {
eads@18 45 text-align: center
eads@18 46 }
eads@18 47
eads@18 48 </style>
eads@18 49 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->
eads@18 50 <script>
eads@18 51
eads@18 52 window.onload = function() {
eads@18 53 var ctx = document.getElementById('c').getContext('2d');
eads@18 54
eads@18 55 ctx.strokeStyle = 'black';
eads@18 56 ctx.lineWidth = 1;
eads@18 57 ctx.beginPath();
eads@18 58 ctx.moveTo(50, 50);
eads@18 59 ctx.quadraticCurveTo(0, 0, 25, 75);
eads@18 60 ctx.quadraticCurveTo(50, 0, 50, 50);
eads@18 61 ctx.stroke();
eads@18 62 };
eads@18 63
eads@18 64 </script>
eads@18 65 </head>
eads@18 66 <body>
eads@18 67
eads@18 68 <canvas id=c width=100 height=100></canvas>
eads@18 69
eads@18 70 <p>This tests that drawing quadratic curves work in the same way in different
eads@18 71 browsers.</p>
eads@18 72
eads@18 73 </body>
eads@18 74 </html>