2012-09-30 17:51:50 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<title>Line Testing</title>
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
|
|
<script type="text/javascript" src="../../dist/paper.js"></script>
|
2012-11-06 02:27:17 -05:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
|
|
|
var x1 = 5,
|
|
|
|
x2 = 45,
|
|
|
|
y1 = 5,
|
|
|
|
y2 = 45;
|
|
|
|
var line1 = new Path.Line([x1, y1], [x2, y2]);
|
|
|
|
line1.strokeColor = "blue";
|
|
|
|
line1.strokeWidth = "10";
|
2012-09-30 17:51:50 -04:00
|
|
|
|
2012-11-06 02:27:17 -05:00
|
|
|
var x3 = 20,
|
|
|
|
x4 = 99,
|
|
|
|
y3 = 20,
|
|
|
|
y4 = 77;
|
|
|
|
var line2 = new Path.Line([x3, y3], [x4, y4]);
|
|
|
|
line2.strokeColor = "red";
|
|
|
|
line2.strokeWidth = "2";
|
|
|
|
|
|
|
|
var x5 = 50,
|
|
|
|
x6 = 200,
|
|
|
|
y5 = 55,
|
|
|
|
y6 = 300;
|
|
|
|
var line3 = new Path.Line([x5, y5], [x6, y6]);
|
|
|
|
line3.strokeColor = "yellow";
|
|
|
|
line3.strokeWidth = "5";
|
2012-09-30 17:51:50 -04:00
|
|
|
|
2012-11-06 15:49:12 -05:00
|
|
|
document.getElementById('svg').appendChild(project.exportSvg());
|
2012-09-30 17:51:50 -04:00
|
|
|
</script>
|
2013-02-10 21:45:50 -05:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<canvas id="canvas" width="500px" height="500px"></canvas>
|
2012-11-06 15:49:12 -05:00
|
|
|
<svg id="svg" style="width: 500px; height: 500px"></svg>
|
2012-09-30 17:51:50 -04:00
|
|
|
</body>
|
|
|
|
</html>
|