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.

54 lines
1.4 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. var circle = new Shape.Circle({
  10. center: [100, 100],
  11. radius: 50,
  12. fillColor: 'red'
  13. });
  14. var ellipse = new Shape.Ellipse({
  15. center: [100, 200],
  16. radius: [50, 25],
  17. fillColor: 'blue',
  18. strokeColor: 'black',
  19. strokeWidth: 10,
  20. rotation: 20
  21. });
  22. var rect = new Shape.Rectangle({
  23. center: [100, 300],
  24. size: [100, 50],
  25. fillColor: 'green',
  26. strokeColor: 'black',
  27. strokeWidth: 10,
  28. rotation: -20
  29. });
  30. var roundRect = new Shape.Rectangle({
  31. center: [100, 400],
  32. size: [50, 100],
  33. radius: [15, 20],
  34. fillColor: 'orange',
  35. strokeColor: 'black',
  36. strokeWidth: 10,
  37. rotation: 20
  38. });
  39. [circle, ellipse, rect, roundRect].forEach(function(shape) {
  40. var path = shape.toPath();
  41. path.position += [200, 0];
  42. var shape2 = path.toShape();
  43. shape2.position += [200, 0];
  44. })
  45. </script>
  46. </head>
  47. <body>
  48. <canvas id="canvas" resize></canvas>
  49. </body>
  50. </html>