source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/SVG Export/Circle Testing.html@ 28914

Last change on this file since 28914 was 28914, checked in by ak19, 10 years ago

Supporting javascript libraries and bespoke code written by Steffan to support the von-sparql user interface

File size: 925 bytes
Line 
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="UTF-8">
5 <title>Circle Testing</title>
6 <link rel="stylesheet" href="../css/style.css">
7 <script type="text/javascript" src="../../dist/paper.js"></script>
8 <script type="text/paperscript" canvas="canvas">
9 var topLeft = new Point(200, 200);
10 var size = new Size(150, 100);
11 var rectangle = new Rectangle(topLeft, size);
12 var path = new Path.Ellipse(rectangle);
13 path.fillColor = 'black';
14
15 var topLeft = new Point(5, 400);
16 var size = new Size(100, 50);
17 var rectangle = new Rectangle(topLeft, size);
18 var path = new Path.Ellipse(rectangle);
19 path.fillColor = 'yellow';
20
21 var path = new Path.Circle(new Point(50, 50), 25);
22 path.fillColor = 'red';
23
24 document.getElementById('svg').appendChild(project.exportSVG());
25 </script>
26</head>
27<body>
28 <canvas id="canvas" width="500" height="500"></canvas>
29 <svg id="svg" width="500" height="500"></svg>
30</body>
31</html>
Note: See TracBrowser for help on using the repository browser.