Mercurial > defr > drupal > scald > dnd
comparison js/bt/other_libs/excanvas_0002/testcases/quadraticcurve.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>Quadratic Curve 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.strokeStyle = 'black'; | |
19 ctx.lineWidth = 1; | |
20 ctx.beginPath(); | |
21 ctx.moveTo(50, 50); | |
22 ctx.quadraticCurveTo(0, 0, 25, 75); | |
23 ctx.quadraticCurveTo(50, 0, 50, 50); | |
24 ctx.stroke(); | |
25 }; | |
26 | |
27 </script> | |
28 </head> | |
29 <body> | |
30 | |
31 <canvas id=c width=100 height=100></canvas> | |
32 | |
33 <p>This tests that drawing quadratic curves work in the same way in different | |
34 browsers.</p> | |
35 | |
36 </body> | |
37 </html> | |
38 <!DOCTYPE html> | |
39 <html> | |
40 <head> | |
41 <title>Quadratic Curve Test</title> | |
42 <style> | |
43 | |
44 body { | |
45 text-align: center | |
46 } | |
47 | |
48 </style> | |
49 <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]--> | |
50 <script> | |
51 | |
52 window.onload = function() { | |
53 var ctx = document.getElementById('c').getContext('2d'); | |
54 | |
55 ctx.strokeStyle = 'black'; | |
56 ctx.lineWidth = 1; | |
57 ctx.beginPath(); | |
58 ctx.moveTo(50, 50); | |
59 ctx.quadraticCurveTo(0, 0, 25, 75); | |
60 ctx.quadraticCurveTo(50, 0, 50, 50); | |
61 ctx.stroke(); | |
62 }; | |
63 | |
64 </script> | |
65 </head> | |
66 <body> | |
67 | |
68 <canvas id=c width=100 height=100></canvas> | |
69 | |
70 <p>This tests that drawing quadratic curves work in the same way in different | |
71 browsers.</p> | |
72 | |
73 </body> | |
74 </html> |