source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/SVG Export/Compound Path.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: 715 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="canvas">
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 document.getElementById('svg').appendChild(project.exportSVG());
15 </script>
16</head>
17<body>
18 <canvas id="canvas" width="500" height="500"></canvas>
19 <svg id="svg" width="500" height="500"></svg>
20</body>
21</html>
Note: See TracBrowser for help on using the repository browser.