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:
826 bytes
|
Line | |
---|
1 | <!DOCTYPE html>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Compound Path</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 | project.currentStyle.fillColor = 'black';
|
---|
10 | var path1 = new Path.Rectangle([200, 200], [100, 100]);
|
---|
11 | var path2 = new Path.Rectangle([50, 50], [200, 200]);
|
---|
12 | var path3 = new Path.Rectangle([0, 0], [400, 400]);
|
---|
13 | new CompoundPath(path1, path2, path3);
|
---|
14 | window._json = project.exportJSON();
|
---|
15 | console.log(window._json);
|
---|
16 | </script>
|
---|
17 | <script type="text/paperscript" canvas="canvas2">
|
---|
18 | project.importJSON(window._json);
|
---|
19 | </script>
|
---|
20 | </head>
|
---|
21 | <body>
|
---|
22 | <canvas id="canvas1" width="500" height="500"></canvas>
|
---|
23 | <canvas id="canvas2" width="500" height="500"></canvas>
|
---|
24 | </body>
|
---|
25 | </html> |
---|
Note:
See
TracBrowser
for help on using the repository browser.