source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/JSON/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: 1.0 KB
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="canvas1">
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 window._json = project.exportJSON();
24 console.log(window._json);
25 </script>
26 <script type="text/paperscript" canvas="canvas2">
27 project.importJSON(window._json);
28 </script>
29</head>
30<body>
31 <canvas id="canvas1" width="500" height="500"></canvas>
32 <canvas id="canvas2" width="500" height="500"></canvas>
33</body>
34</html>
Note: See TracBrowser for help on using the repository browser.