source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/JSON/Transform Test 2.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: 812 bytes
Line 
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="UTF-8">
5 <title>Rectangle 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 path = new Path.Rectangle(new Point(50, 50), new Size(100, 50));
10 path.style = {
11 fillColor: 'white',
12 strokeColor: 'black'
13 };
14 var copy = path.clone();
15 copy.strokeColor = 'red';
16 copy.rotate(-45);
17 copy.scale(0.5);
18
19 window._json = project.exportJSON();
20 console.log(window._json);
21 </script>
22 <script type="text/paperscript" canvas="canvas2">
23 project.importJSON(window._json);
24 </script>
25</head>
26<body>
27 <canvas id="canvas1" width="500" height="500"></canvas>
28 <canvas id="canvas2" width="500" height="500"></canvas>
29</body>
30</html>
Note: See TracBrowser for help on using the repository browser.