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.

44 lines
1.2 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. <script type="text/javascript" src="../../dist/paper-full.js"></script>
  8. <script type="text/paperscript" canvas="canvas1">
  9. var x1 = 5,
  10. x2 = 45,
  11. y1 = 5,
  12. y2 = 45;
  13. var line1 = new Path.Line([x1, y1], [x2, y2]);
  14. line1.strokeColor = "blue";
  15. line1.strokeWidth = "10";
  16. var x3 = 20,
  17. x4 = 99,
  18. y3 = 20,
  19. y4 = 77;
  20. var line2 = new Path.Line([x3, y3], [x4, y4]);
  21. line2.strokeColor = "red";
  22. line2.strokeWidth = "2";
  23. var x5 = 50,
  24. x6 = 200,
  25. y5 = 55,
  26. y6 = 300;
  27. var line3 = new Path.Line([x5, y5], [x6, y6]);
  28. line3.strokeColor = "yellow";
  29. line3.strokeWidth = "5";
  30. window._json = project.exportJSON();
  31. console.log(window._json);
  32. </script>
  33. <script type="text/paperscript" canvas="canvas2">
  34. project.importJSON(window._json);
  35. </script>
  36. </head>
  37. <body>
  38. <canvas id="canvas1" width="500" height="500"></canvas>
  39. <canvas id="canvas2" width="500" height="500"></canvas>
  40. </body>
  41. </html>