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.

38 lines
1.1 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Text 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 text = new PointText(new Point(50, 100));
  10. text.fillColor = 'black';
  11. text.content = 'This is a test';
  12. var text = new PointText(new Point(100, 150));
  13. text.fillColor = 'red';
  14. text.strokeWidth = '4';
  15. text.content = 'This is also a test';
  16. /*
  17. text.scale(5);
  18. text.translate(15, 15);
  19. text.rotate(20);
  20. text.shear(20, 5);
  21. */
  22. text.rotate(45);
  23. text.shear(.85, .15);
  24. text.scale(.85, 2);
  25. window._json = project.exportJSON();
  26. console.log(window._json);
  27. </script>
  28. <script type="text/paperscript" canvas="canvas2">
  29. project.importJSON(window._json);
  30. </script>
  31. </head>
  32. <body>
  33. <canvas id="canvas1" width="500" height="500"></canvas>
  34. <canvas id="canvas2" width="500" height="500"></canvas>
  35. </body>
  36. </html>