Skip to content

Commit b7d2dfb

Browse files
committed
Add two more SvgExport examples.
1 parent 5a316c2 commit b7d2dfb

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; 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+
9+
</head>
10+
<body>
11+
<canvas id="canvas" width="500px" height="500px"></canvas>
12+
<script type="text/paperscript" canvas="canvas">
13+
var circle1 = new Path.Circle(new Point(100, 100), 50);
14+
circle1.fillColor = 'red';
15+
var circle2 = new Path.Circle(new Point(200, 100), 50);
16+
circle2.fillColor = 'blue';
17+
var group = new Group(circle1, circle2);
18+
group.translate([100, 100]);
19+
group.scale(0.5);
20+
group.rotate(10);
21+
document.getElementById('svg').appendChild(project.exportSvg());
22+
</script>
23+
<svg id="svg" style="width: 500px; height: 500px"></svg>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)