Mercurial > hg > NetworkVis
comparison d3s_examples/python-neo4jrestclient/static/platin/lib/excanvas/testcases/arc.html @ 8:18ef6948d689
new d3s examples
author | Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 01 Oct 2015 17:17:27 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
7:45dad9e38c82 | 8:18ef6948d689 |
---|---|
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> |