2012-12-15 17:37:28 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2013-06-02 13:41:10 -07:00
|
|
|
<meta charset="UTF-8">
|
2013-02-10 18:45:50 -08:00
|
|
|
<title>Group Transform</title>
|
2012-12-15 17:37:28 +01:00
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
2014-04-06 13:44:19 +02:00
|
|
|
<script type="text/javascript" src="../../dist/paper-full.js"></script>
|
2012-12-15 17:37:28 +01:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
|
|
|
var circle1 = new Path.Circle(new Point(100, 100), 50);
|
|
|
|
circle1.fillColor = 'red';
|
|
|
|
var circle2 = new Path.Circle(new Point(200, 100), 50);
|
|
|
|
circle2.fillColor = 'blue';
|
|
|
|
var group = new Group(circle1, circle2);
|
|
|
|
group.translate([100, 100]);
|
|
|
|
group.scale(0.5);
|
|
|
|
group.rotate(10);
|
2013-04-23 07:19:08 -07:00
|
|
|
document.getElementById('svg').appendChild(project.exportSVG());
|
2012-12-15 17:37:28 +01:00
|
|
|
</script>
|
2013-02-10 18:45:50 -08:00
|
|
|
</head>
|
2013-02-12 15:08:48 -08:00
|
|
|
<body>
|
|
|
|
<canvas id="canvas" width="500" height="500"></canvas>
|
|
|
|
<svg id="svg" width="500" height="500"></svg>
|
2012-12-15 17:37:28 +01:00
|
|
|
</body>
|
2014-04-06 13:44:19 +02:00
|
|
|
</html>
|