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.

65 lines
1.8 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Shapes</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="canvas">
  9. view.zoom = 1.5;
  10. settings.applyMatrix = false;
  11. var strokeScaling = false;
  12. var path = new Path.Circle({
  13. center: view.center - [0, 140],
  14. radius: 50,
  15. fillColor: 'red',
  16. strokeColor: 'black',
  17. strokeWidth: 10,
  18. strokeScaling: strokeScaling,
  19. opacity: 0.5,
  20. selected: true
  21. });
  22. path.scale(2, 1);
  23. var shape = new Shape.Circle({
  24. center: view.center,
  25. radius: 50,
  26. fillColor: 'red',
  27. strokeColor: 'black',
  28. strokeWidth: 10,
  29. strokeScaling: strokeScaling,
  30. opacity: 0.5,
  31. selected: true
  32. });
  33. shape.scale(2, 1);
  34. var hole;
  35. var compound = new CompoundPath({
  36. children: [
  37. new Path.Rectangle({
  38. point: [0, 0],
  39. size: [100, 100]
  40. }),
  41. hole = new Path.Circle({
  42. center: [50, 50],
  43. radius: 25
  44. })
  45. ],
  46. fillColor: 'red',
  47. strokeColor: 'black',
  48. strokeWidth: 10,
  49. position: view.center + [0, 140],
  50. strokeScaling: strokeScaling,
  51. opacity: 0.5,
  52. selected: true
  53. });
  54. hole.position += 15;
  55. compound.scale(2, 1);
  56. document.body.appendChild(project.exportSVG());
  57. </script>
  58. </head>
  59. <body>
  60. <canvas id="canvas" width="300" height="500"></canvas>
  61. </body>
  62. </html>