Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Line Testing</title>
  6. <link rel="stylesheet" href="../css/style.css">
  7. <!-- IE 9: display inline SVG -->
  8. <meta http-equiv="X-UA-Compatible" content="IE=9">
  9. <script type="text/javascript" src="../../dist/paper-full.js"></script>
  10. <script type="text/paperscript" canvas="canvas">
  11. var x1 = 5,
  12. x2 = 45,
  13. y1 = 5,
  14. y2 = 45;
  15. var line1 = new Path.Line([x1, y1], [x2, y2]);
  16. line1.strokeColor = "blue";
  17. line1.strokeWidth = "10";
  18. var x3 = 20,
  19. x4 = 99,
  20. y3 = 20,
  21. y4 = 77;
  22. var line2 = new Path.Line([x3, y3], [x4, y4]);
  23. line2.strokeColor = "red";
  24. line2.strokeWidth = "2";
  25. var x5 = 50,
  26. x6 = 200,
  27. y5 = 55,
  28. y6 = 300;
  29. var line3 = new Path.Line([x5, y5], [x6, y6]);
  30. line3.strokeColor = "yellow";
  31. line3.strokeWidth = "5";
  32. document.body.appendChild(project.exportSVG());
  33. </script>
  34. </head>
  35. <body>
  36. <canvas id="canvas" width="500" height="500"></canvas>
  37. </body>
  38. </html>