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.

22 lines
807 B

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Compound Path</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. project.currentStyle.fillColor = 'black';
  12. var path1 = new Path.Rectangle([200, 200], [100, 100]);
  13. var path2 = new Path.Rectangle([50, 50], [200, 200]);
  14. var path3 = new Path.Rectangle([0, 0], [400, 400]);
  15. new CompoundPath(path1, path2, path3);
  16. document.body.appendChild(project.exportSVG());
  17. </script>
  18. </head>
  19. <body>
  20. <canvas id="canvas" width="500" height="500"></canvas>
  21. </body>
  22. </html>