source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/SVG Export/Transform Test 1.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: 788 bytes
Line 
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="UTF-8">
5 <title>Transform 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 circlePath = new Path.Circle(new Point(280, 100), 25);
10 circlePath.strokeColor = 'black';
11 circlePath.fillColor = 'white';
12
13 var clones = 30;
14 var angle = 360 / clones;
15
16 for(var i = 0; i < clones; i++) {
17 var clonedPath = circlePath.clone();
18 clonedPath.rotate(angle * i, circlePath.bounds.topLeft);
19 };
20
21 document.getElementById('svg').appendChild(project.exportSVG());
22 </script>
23</head>
24<body>
25 <canvas id="canvas" width="500" height="500"></canvas>
26 <svg id="svg" width="500" height="500"></svg>
27</body>
28</html>
Note: See TracBrowser for help on using the repository browser.