paper 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +252 -0
  2. package/README.md +3 -1
  3. package/dist/docs/assets/js/paper.js +6997 -1658
  4. package/dist/docs/classes/AreaText.html +8658 -0
  5. package/dist/docs/classes/ChangeFlag.html +2 -1
  6. package/dist/docs/classes/Color.html +2 -1
  7. package/dist/docs/classes/CompoundPath.html +152 -67
  8. package/dist/docs/classes/Curve.html +2 -1
  9. package/dist/docs/classes/CurveLocation.html +2 -1
  10. package/dist/docs/classes/Event.html +5 -4
  11. package/dist/docs/classes/Gradient.html +2 -1
  12. package/dist/docs/classes/GradientStop.html +2 -1
  13. package/dist/docs/classes/Group.html +117 -15
  14. package/dist/docs/classes/HitResult.html +2 -1
  15. package/dist/docs/classes/HostItem.html +80 -15
  16. package/dist/docs/classes/Item.html +137 -15
  17. package/dist/docs/classes/Key.html +2 -1
  18. package/dist/docs/classes/KeyEvent.html +5 -4
  19. package/dist/docs/classes/Layer.html +114 -15
  20. package/dist/docs/classes/Matrix.html +2 -1
  21. package/dist/docs/classes/MouseEvent.html +5 -4
  22. package/dist/docs/classes/PaperScope.html +4 -2
  23. package/dist/docs/classes/PaperScript.html +5 -2
  24. package/dist/docs/classes/Path.html +126 -67
  25. package/dist/docs/classes/PathItem.html +270 -185
  26. package/dist/docs/classes/PathText.html +8528 -0
  27. package/dist/docs/classes/Point.html +13 -2
  28. package/dist/docs/classes/PointText.html +1346 -59
  29. package/dist/docs/classes/Project.html +40 -7
  30. package/dist/docs/classes/Raster.html +80 -15
  31. package/dist/docs/classes/Rectangle.html +3 -2
  32. package/dist/docs/classes/Segment.html +2 -1
  33. package/dist/docs/classes/Shape.html +80 -15
  34. package/dist/docs/classes/Size.html +4 -2
  35. package/dist/docs/classes/Style.html +767 -14
  36. package/dist/docs/classes/SymbolDefinition.html +2 -1
  37. package/dist/docs/classes/SymbolItem.html +80 -15
  38. package/dist/docs/classes/TextItem.html +1469 -179
  39. package/dist/docs/classes/TextRange.html +186 -0
  40. package/dist/docs/classes/TextStory.html +355 -0
  41. package/dist/docs/classes/Tool.html +2 -1
  42. package/dist/docs/classes/ToolEvent.html +57 -4
  43. package/dist/docs/classes/Tween.html +17 -1
  44. package/dist/docs/classes/View.html +9 -8
  45. package/dist/docs/classes/global.html +2 -1
  46. package/dist/docs/classes/index.html +2 -2
  47. package/dist/docs/index.html +1 -1
  48. package/dist/paper-core.js +6832 -1637
  49. package/dist/paper-core.min.js +3 -3
  50. package/dist/paper-full.js +6997 -1658
  51. package/dist/paper-full.min.js +3 -3
  52. package/dist/{paper-sourced.js → paper-hosted.js} +7109 -1682
  53. package/dist/paper.d.ts +1727 -163
  54. package/examples/Scripts/AreaText.html +65 -0
  55. package/examples/Scripts/PathText.html +48 -0
  56. package/examples/Scripts/TextRanges.html +51 -0
  57. package/package.json +3 -2
@@ -17,7 +17,8 @@
17
17
 
18
18
  <p> Extends <b><a href="../classes/Item.html"><tt>Item</tt></a></b></p>
19
19
 
20
- <p>The TextItem type allows you to create typography. Its functionality is inherited by different text item types such as <a href="../classes/PointText.html"><tt>PointText</tt></a>, and <tt>AreaText</tt> (coming soon). They each add a layer of functionality that is unique to their type, but share the underlying properties and functions that they inherit from TextItem.</p>
20
+ <p>The TextItem type allows you to create typography. Its functionality is inherited by different text item types such as <a href="../classes/PointText.html"><tt>PointText</tt></a>, <a href="../classes/PathText.html"><tt>PathText</tt></a> and <a href="../classes/AreaText.html"><tt>AreaText</tt></a>. They each add a layer of functionality that is unique to their type, but share the underlying properties and functions that they inherit from TextItem.</p>
21
+
21
22
 
22
23
  </div>
23
24
 
@@ -30,16 +31,21 @@
30
31
  <h2>Properties</h2>
31
32
 
32
33
 
33
- <div id="content" class="member">
34
+ <div id="orientation" class="member">
34
35
  <div class="member-link">
35
- <a name="content" href="#content"><tt><b>content</b></tt></a>
36
+ <a name="orientation" href="#orientation"><tt><b>orientation</b></tt></a>
36
37
  </div>
37
38
  <div class="member-description hidden">
38
39
 
39
40
  <div class="member-text">
40
- <p>The text contents of the text item.</p>
41
+ <p>The direction the text&rsquo;s lines run in: <code>&#39;horizontal&#39;</code>, or <code>&#39;vertical&#39;</code> from top to bottom, with the lines from right to left.</p>
42
+
41
43
 
42
44
 
45
+ <ul class="member-list">
46
+ <h4>Default:</h4>
47
+ <li><tt>'horizontal'</tt></li>
48
+ </ul>
43
49
 
44
50
  <ul class="member-list">
45
51
  <h4>Type:</h4>
@@ -49,51 +55,175 @@
49
55
  </ul>
50
56
 
51
57
 
52
- <h4>Example:<span class="description">Setting the content of a PointText item:</span></h4>
58
+
59
+ </div>
53
60
 
54
- <div class="paperscript split">
61
+ </div>
62
+ </div>
63
+
64
+
65
+ <div id="textpath" class="member">
66
+ <div class="member-link">
67
+ <a name="textpath" href="#textpath"><tt><b>textPath</b></tt></a>
68
+ </div>
69
+ <div class="member-description hidden">
55
70
 
56
- <div class="buttons">
57
- <div class="button run">Run</div>
71
+ <div class="member-text">
72
+ <p>The path that the text flows in (<a href="../classes/AreaText.html"><tt>AreaText</tt></a>) or along (<a href="../classes/PathText.html"><tt>PathText</tt></a>). It guides the text and isn&rsquo;t drawn itself.</p>
73
+
74
+
75
+
76
+ <ul class="member-list">
77
+ <h4>Type:</h4>
78
+ <li>
79
+ <a href="../classes/PathItem.html"><tt>PathItem</tt></a>
80
+ </li>
81
+ </ul>
82
+
83
+
84
+
58
85
  </div>
59
86
 
60
- <script type="text/paperscript" canvas="canvas-0">
61
- // Create a point-text item at {x: 30, y: 30}:
62
- var text = new PointText(new Point(30, 30));
63
- text.fillColor = 'black';
87
+ </div>
88
+ </div>
89
+
90
+
91
+ <h3>Linking</h3>
64
92
 
65
- // Set the content of the text item:
66
- text.content = 'Hello world';
67
- </script>
68
- <div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
93
+ <div id="story" class="member">
94
+ <div class="member-link">
95
+ <a name="story" href="#story"><tt><b>story</b></tt></a>
69
96
  </div>
97
+ <div class="member-description hidden">
70
98
 
99
+ <div class="member-text">
100
+ <p>The story the text item shows: the text of all the text items linked with it.</p>
101
+
102
+ <p>Read only.</p>
103
+
104
+
105
+
106
+ <ul class="member-list">
107
+ <h4>Type:</h4>
108
+ <li>
109
+ <a href="../classes/TextStory.html"><tt>TextStory</tt></a>
110
+ </li>
111
+ </ul>
112
+
113
+
114
+
115
+ </div>
71
116
 
72
- <h4>Example:<span class="description">Interactive example, move your mouse over the view below:</span></h4>
117
+ </div>
118
+ </div>
119
+
120
+
121
+ <div id="nexttextitem" class="member">
122
+ <div class="member-link">
123
+ <a name="nexttextitem" href="#nexttextitem"><tt><b>nextTextItem</b></tt></a>
124
+ </div>
125
+ <div class="member-description hidden">
73
126
 
74
- <div class="paperscript split">
127
+ <div class="member-text">
128
+ <p>The text item after this one in its story, if any.</p>
129
+
130
+ <p>Read only.</p>
131
+
132
+
133
+
134
+ <ul class="member-list">
135
+ <h4>Type:</h4>
136
+ <li>
137
+ <a href="../classes/TextItem.html"><tt>TextItem</tt></a>
138
+ </li>
139
+ </ul>
140
+
141
+
142
+
143
+ </div>
75
144
 
76
- <div class="buttons">
77
- <div class="button run">Run</div>
78
145
  </div>
146
+ </div>
147
+
148
+
149
+ <div id="previoustextitem" class="member">
150
+ <div class="member-link">
151
+ <a name="previoustextitem" href="#previoustextitem"><tt><b>previousTextItem</b></tt></a>
152
+ </div>
153
+ <div class="member-description hidden">
79
154
 
80
- <script type="text/paperscript" canvas="canvas-1">
81
- // Create a point-text item at {x: 30, y: 30}:
82
- var text = new PointText(new Point(30, 30));
83
- text.fillColor = 'black';
155
+ <div class="member-text">
156
+ <p>The text item before this one in its story, if any.</p>
157
+
158
+ <p>Read only.</p>
159
+
160
+
161
+
162
+ <ul class="member-list">
163
+ <h4>Type:</h4>
164
+ <li>
165
+ <a href="../classes/TextItem.html"><tt>TextItem</tt></a>
166
+ </li>
167
+ </ul>
168
+
169
+
170
+
171
+ </div>
84
172
 
85
- text.content = 'Move your mouse over the view, to see its position';
173
+ </div>
174
+ </div>
175
+
176
+
177
+ <div id="visiblerange" class="member">
178
+ <div class="member-link">
179
+ <a name="visiblerange" href="#visiblerange"><tt><b>visibleRange</b></tt></a>
180
+ </div>
181
+ <div class="member-description hidden">
86
182
 
87
- function onMouseMove(event) {
88
- // Each time the mouse is moved, set the content of
89
- // the point text to describe the position of the mouse:
90
- text.content = 'Your position is: ' + event.point.toString();
91
- }
92
- </script>
93
- <div class="canvas"><canvas width="516" height="100" id="canvas-1"></canvas></div>
183
+ <div class="member-text">
184
+ <p>The range of the story that this text item shows, as its layout flows the story through the linked text items: without the overflow, and without what the ones before it show.</p>
185
+
186
+ <p>Read only.</p>
187
+
188
+
189
+
190
+ <ul class="member-list">
191
+ <h4>Type:</h4>
192
+ <li>
193
+ <a href="../classes/TextRange.html"><tt>TextRange</tt></a>
194
+ </li>
195
+ </ul>
196
+
197
+
198
+
94
199
  </div>
95
200
 
201
+ </div>
202
+ </div>
203
+
204
+
205
+ <div id="lines" class="member">
206
+ <div class="member-link">
207
+ <a name="lines" href="#lines"><tt><b>lines</b></tt></a>
208
+ </div>
209
+ <div class="member-description hidden">
96
210
 
211
+ <div class="member-text">
212
+ <p>The lines of the text, as its layout breaks them: each a range of its story, with its <code>baseline</code>, a <a href="../classes/undefined.html"><tt>Line</tt></a> along it, and its <code>bounds</code>, in the text item&rsquo;s own coordinates. A <a href="../classes/PathText.html"><tt>PathText</tt></a>&rsquo;s one line follows its path: these describe it laid out straight.</p>
213
+
214
+ <p>Read only.</p>
215
+
216
+
217
+
218
+ <ul class="member-list">
219
+ <h4>Type:</h4>
220
+ <li>
221
+ Array of <a href="../classes/TextRange.html"><tt>TextRange</tt></a> objects
222
+ </li>
223
+ </ul>
224
+
225
+
226
+
97
227
  </div>
98
228
 
99
229
  </div>
@@ -195,20 +325,20 @@ function onMouseMove(event) {
195
325
  </div>
196
326
 
197
327
 
198
- <div id="leading" class="member">
328
+ <div id="lineheight" class="member">
199
329
  <div class="member-link">
200
- <a name="leading" href="#leading"><tt><b>leading</b></tt></a>
330
+ <a name="lineheight" href="#lineheight"><tt><b>lineHeight</b></tt></a>
201
331
  </div>
202
332
  <div class="member-description hidden">
203
333
 
204
334
  <div class="member-text">
205
- <p>The text leading of text content.</p>
335
+ <p>The line height of text content: the distance from one line&rsquo;s baseline to the next. Automatic, as <code>&#39;auto&#39;</code> (1.2) or another factor of the letters&rsquo; font size, each line moving down by its largest letters&rsquo;; or fixed, as a length with units as the font size takes them (<code>&#39;18px&#39;</code>, <code>&#39;12pt&#39;</code>). <code>leading</code>, as Paper.js had it before, sets and reads it as a fixed length in pixels.</p>
206
336
 
207
337
 
208
338
 
209
339
  <ul class="member-list">
210
340
  <h4>Default:</h4>
211
- <li><tt>fontSize * 1.2</tt></li>
341
+ <li><tt>'auto'</tt></li>
212
342
  </ul>
213
343
 
214
344
  <ul class="member-list">
@@ -226,14 +356,14 @@ function onMouseMove(event) {
226
356
  </div>
227
357
 
228
358
 
229
- <div id="tracking" class="member">
359
+ <div id="lettertracking" class="member">
230
360
  <div class="member-link">
231
- <a name="tracking" href="#tracking"><tt><b>tracking</b></tt></a>
361
+ <a name="lettertracking" href="#lettertracking"><tt><b>letterTracking</b></tt></a>
232
362
  </div>
233
363
  <div class="member-description hidden">
234
364
 
235
365
  <div class="member-text">
236
- <p>The tracking of text content: the space added after each character, in thousandths of an em, as in Adobe Illustrator and InDesign. A tracking of 100 adds a tenth of the font size.</p>
366
+ <p>The letter tracking of text content: the space added after each letter, along the line, in thousandths of an em, as in Adobe Illustrator and InDesign. A tracking of 100 adds a tenth of the font size. Also <code>tracking</code>, its former name.</p>
237
367
 
238
368
 
239
369
 
@@ -257,27 +387,56 @@ function onMouseMove(event) {
257
387
  </div>
258
388
 
259
389
 
260
- <h3>Paragraph Style</h3>
390
+ <div id="letterkerning" class="member">
391
+ <div class="member-link">
392
+ <a name="letterkerning" href="#letterkerning"><tt><b>letterKerning</b></tt></a>
393
+ </div>
394
+ <div class="member-description hidden">
261
395
 
262
- <div id="justification" class="member">
396
+ <div class="member-text">
397
+ <p>The letter kerning of text content: the space added after a letter, along the line, in thousandths of an em, in place of the font&rsquo;s own kerning pair; <code>null</code> for the font&rsquo;s kerning.</p>
398
+
399
+
400
+
401
+ <ul class="member-list">
402
+ <h4>Default:</h4>
403
+ <li><tt>null</tt></li>
404
+ </ul>
405
+
406
+ <ul class="member-list">
407
+ <h4>Type:</h4>
408
+ <li>
409
+ <tt>Number</tt>
410
+ </li>
411
+ </ul>
412
+
413
+
414
+
415
+ </div>
416
+
417
+ </div>
418
+ </div>
419
+
420
+
421
+ <div id="fontstyle" class="member">
263
422
  <div class="member-link">
264
- <a name="justification" href="#justification"><tt><b>justification</b></tt></a>
423
+ <a name="fontstyle" href="#fontstyle"><tt><b>fontStyle</b></tt></a>
265
424
  </div>
266
425
  <div class="member-description hidden">
267
426
 
268
427
  <div class="member-text">
269
- <p>The justification of text paragraphs.</p>
428
+ <p>The font style of text content, as in CSS: upright or slanted. Together with the <a href="../classes/TextItem.html#fontweight"><tt>fontWeight</tt></a>, it says what a font&rsquo;s style name says, e.g. <code>&#39;Bold Italic&#39;</code>.</p>
270
429
 
271
430
 
272
431
  <ul class="member-list">
273
432
  <h4>Values:</h4>
274
- <li><tt>'left'</tt>, <tt>'right'</tt>, <tt>'center'</tt></li>
433
+ <li><tt>'normal'</tt>, <tt>'italic'</tt>, <tt>'oblique'</tt></li>
275
434
  </ul>
276
435
 
277
436
 
278
437
  <ul class="member-list">
279
438
  <h4>Default:</h4>
280
- <li><tt>'left'</tt></li>
439
+ <li><tt>'normal'</tt></li>
281
440
  </ul>
282
441
 
283
442
  <ul class="member-list">
@@ -294,11 +453,1078 @@ function onMouseMove(event) {
294
453
  </div>
295
454
  </div>
296
455
 
297
- </div>
456
+
457
+ <div id="fontvariations" class="member">
458
+ <div class="member-link">
459
+ <a name="fontvariations" href="#fontvariations"><tt><b>fontVariations</b></tt></a>
460
+ </div>
461
+ <div class="member-description hidden">
462
+
463
+ <div class="member-text">
464
+ <p>The settings of a variable font&rsquo;s axes, by their tags: <code>{ wght: 600,
465
+ wdth: 80 }</code>. Kept for hosts that lay text out with its fonts; canvas doesn&rsquo;t draw them.</p>
466
+
467
+
468
+
469
+ <ul class="member-list">
470
+ <h4>Default:</h4>
471
+ <li><tt>null</tt></li>
472
+ </ul>
473
+
474
+ <ul class="member-list">
475
+ <h4>Type:</h4>
476
+ <li>
477
+ <tt>Object</tt>
478
+ </li>
479
+ </ul>
480
+
481
+
482
+
483
+ </div>
298
484
 
485
+ </div>
486
+ </div>
487
+
488
+
489
+ <div id="baselineshift" class="member">
490
+ <div class="member-link">
491
+ <a name="baselineshift" href="#baselineshift"><tt><b>baselineShift</b></tt></a>
492
+ </div>
493
+ <div class="member-description hidden">
299
494
 
495
+ <div class="member-text">
496
+ <p>How far the letters move up from the baseline, in pixels.</p>
497
+
498
+
499
+
500
+ <ul class="member-list">
501
+ <h4>Default:</h4>
502
+ <li><tt>0</tt></li>
503
+ </ul>
504
+
505
+ <ul class="member-list">
506
+ <h4>Type:</h4>
507
+ <li>
508
+ <tt>Number</tt>
509
+ </li>
510
+ </ul>
511
+
512
+
513
+
514
+ </div>
300
515
 
516
+ </div>
517
+ </div>
518
+
519
+
520
+ <div id="baselineposition" class="member">
521
+ <div class="member-link">
522
+ <a name="baselineposition" href="#baselineposition"><tt><b>baselinePosition</b></tt></a>
523
+ </div>
524
+ <div class="member-description hidden">
301
525
 
526
+ <div class="member-text">
527
+ <p>Whether the letters are set as superscripts or subscripts: smaller, and above or below the baseline.</p>
528
+
529
+
530
+ <ul class="member-list">
531
+ <h4>Values:</h4>
532
+ <li><tt>'normal'</tt>, <tt>'superscript'</tt>, <tt>'subscript'</tt></li>
533
+ </ul>
534
+
535
+
536
+ <ul class="member-list">
537
+ <h4>Default:</h4>
538
+ <li><tt>'normal'</tt></li>
539
+ </ul>
540
+
541
+ <ul class="member-list">
542
+ <h4>Type:</h4>
543
+ <li>
544
+ <tt>String</tt>
545
+ </li>
546
+ </ul>
547
+
548
+
549
+
550
+ </div>
551
+
552
+ </div>
553
+ </div>
554
+
555
+
556
+ <div id="letterscaling" class="member">
557
+ <div class="member-link">
558
+ <a name="letterscaling" href="#letterscaling"><tt><b>letterScaling</b></tt></a>
559
+ </div>
560
+ <div class="member-description hidden">
561
+
562
+ <div class="member-text">
563
+ <p>How much the letters are scaled, as <a href="../classes/Item.html#scaling"><tt>item.scaling</tt></a>: one factor for both directions, or a point with the horizontal and vertical ones.</p>
564
+
565
+
566
+
567
+ <ul class="member-list">
568
+ <h4>Default:</h4>
569
+ <li><tt>1</tt></li>
570
+ </ul>
571
+
572
+ <ul class="member-list">
573
+ <h4>Type:</h4>
574
+ <li>
575
+ <tt>Number</tt>⟋<a href="../classes/Point.html"><tt>Point</tt></a>
576
+ </li>
577
+ </ul>
578
+
579
+
580
+
581
+ </div>
582
+
583
+ </div>
584
+ </div>
585
+
586
+
587
+ <div id="letterrotation" class="member">
588
+ <div class="member-link">
589
+ <a name="letterrotation" href="#letterrotation"><tt><b>letterRotation</b></tt></a>
590
+ </div>
591
+ <div class="member-description hidden">
592
+
593
+ <div class="member-text">
594
+ <p>The rotation of each letter about its origin on the baseline, in degrees.</p>
595
+
596
+
597
+
598
+ <ul class="member-list">
599
+ <h4>Default:</h4>
600
+ <li><tt>0</tt></li>
601
+ </ul>
602
+
603
+ <ul class="member-list">
604
+ <h4>Type:</h4>
605
+ <li>
606
+ <tt>Number</tt>
607
+ </li>
608
+ </ul>
609
+
610
+
611
+
612
+ </div>
613
+
614
+ </div>
615
+ </div>
616
+
617
+
618
+ <div id="capitals" class="member">
619
+ <div class="member-link">
620
+ <a name="capitals" href="#capitals"><tt><b>capitals</b></tt></a>
621
+ </div>
622
+ <div class="member-description hidden">
623
+
624
+ <div class="member-text">
625
+ <p>Whether the letters are set as capitals, or as small capitals.</p>
626
+
627
+
628
+ <ul class="member-list">
629
+ <h4>Values:</h4>
630
+ <li><tt>'normal'</tt>, <tt>'all'</tt>, <tt>'small'</tt></li>
631
+ </ul>
632
+
633
+
634
+ <ul class="member-list">
635
+ <h4>Default:</h4>
636
+ <li><tt>'normal'</tt></li>
637
+ </ul>
638
+
639
+ <ul class="member-list">
640
+ <h4>Type:</h4>
641
+ <li>
642
+ <tt>String</tt>
643
+ </li>
644
+ </ul>
645
+
646
+
647
+
648
+ </div>
649
+
650
+ </div>
651
+ </div>
652
+
653
+
654
+ <div id="underline" class="member">
655
+ <div class="member-link">
656
+ <a name="underline" href="#underline"><tt><b>underline</b></tt></a>
657
+ </div>
658
+ <div class="member-description hidden">
659
+
660
+ <div class="member-text">
661
+ <p>Whether the letters are underlined.</p>
662
+
663
+
664
+
665
+ <ul class="member-list">
666
+ <h4>Default:</h4>
667
+ <li><tt>false</tt></li>
668
+ </ul>
669
+
670
+ <ul class="member-list">
671
+ <h4>Type:</h4>
672
+ <li>
673
+ <tt>Boolean</tt>
674
+ </li>
675
+ </ul>
676
+
677
+
678
+
679
+ </div>
680
+
681
+ </div>
682
+ </div>
683
+
684
+
685
+ <div id="strikethrough" class="member">
686
+ <div class="member-link">
687
+ <a name="strikethrough" href="#strikethrough"><tt><b>strikethrough</b></tt></a>
688
+ </div>
689
+ <div class="member-description hidden">
690
+
691
+ <div class="member-text">
692
+ <p>Whether the letters are struck through.</p>
693
+
694
+
695
+
696
+ <ul class="member-list">
697
+ <h4>Default:</h4>
698
+ <li><tt>false</tt></li>
699
+ </ul>
700
+
701
+ <ul class="member-list">
702
+ <h4>Type:</h4>
703
+ <li>
704
+ <tt>Boolean</tt>
705
+ </li>
706
+ </ul>
707
+
708
+
709
+
710
+ </div>
711
+
712
+ </div>
713
+ </div>
714
+
715
+
716
+ <div id="features" class="member">
717
+ <div class="member-link">
718
+ <a name="features" href="#features"><tt><b>features</b></tt></a>
719
+ </div>
720
+ <div class="member-description hidden">
721
+
722
+ <div class="member-text">
723
+ <p>The OpenType features to turn on (<code>&#39;dlig&#39;</code>) or off (<code>&#39;-liga&#39;</code>). Kept for hosts that lay text out with its fonts; canvas doesn&rsquo;t draw them.</p>
724
+
725
+
726
+
727
+ <ul class="member-list">
728
+ <h4>Default:</h4>
729
+ <li><tt>null</tt></li>
730
+ </ul>
731
+
732
+ <ul class="member-list">
733
+ <h4>Type:</h4>
734
+ <li>
735
+ Array of <tt>Strings</tt>
736
+ </li>
737
+ </ul>
738
+
739
+
740
+
741
+ </div>
742
+
743
+ </div>
744
+ </div>
745
+
746
+
747
+ <h3>Paragraph Style</h3>
748
+
749
+ <div id="justification" class="member">
750
+ <div class="member-link">
751
+ <a name="justification" href="#justification"><tt><b>justification</b></tt></a>
752
+ </div>
753
+ <div class="member-description hidden">
754
+
755
+ <div class="member-text">
756
+ <p>The justification of text paragraphs.</p>
757
+
758
+
759
+ <ul class="member-list">
760
+ <h4>Values:</h4>
761
+ <li><tt>'left'</tt>, <tt>'right'</tt>, <tt>'center'</tt>, <tt>'start'</tt>, <tt>'end'</tt>, <tt>'justify'</tt></li>
762
+ </ul>
763
+
764
+
765
+ <ul class="member-list">
766
+ <h4>Default:</h4>
767
+ <li><tt>'left'</tt></li>
768
+ </ul>
769
+
770
+ <ul class="member-list">
771
+ <h4>Type:</h4>
772
+ <li>
773
+ <tt>String</tt>
774
+ </li>
775
+ </ul>
776
+
777
+
778
+
779
+ </div>
780
+
781
+ </div>
782
+ </div>
783
+
784
+
785
+ <div id="justifylast" class="member">
786
+ <div class="member-link">
787
+ <a name="justifylast" href="#justifylast"><tt><b>justifyLast</b></tt></a>
788
+ </div>
789
+ <div class="member-description hidden">
790
+
791
+ <div class="member-text">
792
+ <p>How the last line of a justified paragraph is aligned; <code>&#39;all&#39;</code> justifies it too.</p>
793
+
794
+
795
+ <ul class="member-list">
796
+ <h4>Values:</h4>
797
+ <li><tt>'left'</tt>, <tt>'right'</tt>, <tt>'center'</tt>, <tt>'start'</tt>, <tt>'end'</tt>, <tt>'all'</tt></li>
798
+ </ul>
799
+
800
+
801
+ <ul class="member-list">
802
+ <h4>Default:</h4>
803
+ <li><tt>'left'</tt></li>
804
+ </ul>
805
+
806
+ <ul class="member-list">
807
+ <h4>Type:</h4>
808
+ <li>
809
+ <tt>String</tt>
810
+ </li>
811
+ </ul>
812
+
813
+
814
+
815
+ </div>
816
+
817
+ </div>
818
+ </div>
819
+
820
+
821
+ <div id="justifyspacing" class="member">
822
+ <div class="member-link">
823
+ <a name="justifyspacing" href="#justifyspacing"><tt><b>justifySpacing</b></tt></a>
824
+ </div>
825
+ <div class="member-description hidden">
826
+
827
+ <div class="member-text">
828
+ <p>How far justification may change the spacing, each as <code>[minimum, desired,
829
+ maximum]</code> in percent: <code>{ word: [80, 100, 133], letter: [0, 0, 0], glyph:
830
+ [100, 100, 100] }</code>; <code>null</code> for those. Kept for hosts: canvas text justifies by the word spacing alone.</p>
831
+
832
+
833
+
834
+ <ul class="member-list">
835
+ <h4>Default:</h4>
836
+ <li><tt>null</tt></li>
837
+ </ul>
838
+
839
+ <ul class="member-list">
840
+ <h4>Type:</h4>
841
+ <li>
842
+ <tt>Object</tt>
843
+ </li>
844
+ </ul>
845
+
846
+
847
+
848
+ </div>
849
+
850
+ </div>
851
+ </div>
852
+
853
+
854
+ <div id="startindent" class="member">
855
+ <div class="member-link">
856
+ <a name="startindent" href="#startindent"><tt><b>startIndent</b></tt></a>
857
+ </div>
858
+ <div class="member-description hidden">
859
+
860
+ <div class="member-text">
861
+ <p>The indent where the paragraph&rsquo;s lines start: left in left-to-right text, right in right-to-left text.</p>
862
+
863
+
864
+
865
+ <ul class="member-list">
866
+ <h4>Default:</h4>
867
+ <li><tt>0</tt></li>
868
+ </ul>
869
+
870
+ <ul class="member-list">
871
+ <h4>Type:</h4>
872
+ <li>
873
+ <tt>Number</tt>
874
+ </li>
875
+ </ul>
876
+
877
+
878
+
879
+ </div>
880
+
881
+ </div>
882
+ </div>
883
+
884
+
885
+ <div id="endindent" class="member">
886
+ <div class="member-link">
887
+ <a name="endindent" href="#endindent"><tt><b>endIndent</b></tt></a>
888
+ </div>
889
+ <div class="member-description hidden">
890
+
891
+ <div class="member-text">
892
+ <p>The indent where the paragraph&rsquo;s lines end.</p>
893
+
894
+
895
+
896
+ <ul class="member-list">
897
+ <h4>Default:</h4>
898
+ <li><tt>0</tt></li>
899
+ </ul>
900
+
901
+ <ul class="member-list">
902
+ <h4>Type:</h4>
903
+ <li>
904
+ <tt>Number</tt>
905
+ </li>
906
+ </ul>
907
+
908
+
909
+
910
+ </div>
911
+
912
+ </div>
913
+ </div>
914
+
915
+
916
+ <div id="firstlineindent" class="member">
917
+ <div class="member-link">
918
+ <a name="firstlineindent" href="#firstlineindent"><tt><b>firstLineIndent</b></tt></a>
919
+ </div>
920
+ <div class="member-description hidden">
921
+
922
+ <div class="member-text">
923
+ <p>The indent of the paragraph&rsquo;s first line, added to its start indent.</p>
924
+
925
+
926
+
927
+ <ul class="member-list">
928
+ <h4>Default:</h4>
929
+ <li><tt>0</tt></li>
930
+ </ul>
931
+
932
+ <ul class="member-list">
933
+ <h4>Type:</h4>
934
+ <li>
935
+ <tt>Number</tt>
936
+ </li>
937
+ </ul>
938
+
939
+
940
+
941
+ </div>
942
+
943
+ </div>
944
+ </div>
945
+
946
+
947
+ <div id="spacebefore" class="member">
948
+ <div class="member-link">
949
+ <a name="spacebefore" href="#spacebefore"><tt><b>spaceBefore</b></tt></a>
950
+ </div>
951
+ <div class="member-description hidden">
952
+
953
+ <div class="member-text">
954
+ <p>The space above the paragraph. Between two paragraphs, the larger of this one&rsquo;s and the space after the one before it is used.</p>
955
+
956
+
957
+
958
+ <ul class="member-list">
959
+ <h4>Default:</h4>
960
+ <li><tt>0</tt></li>
961
+ </ul>
962
+
963
+ <ul class="member-list">
964
+ <h4>Type:</h4>
965
+ <li>
966
+ <tt>Number</tt>
967
+ </li>
968
+ </ul>
969
+
970
+
971
+
972
+ </div>
973
+
974
+ </div>
975
+ </div>
976
+
977
+
978
+ <div id="spaceafter" class="member">
979
+ <div class="member-link">
980
+ <a name="spaceafter" href="#spaceafter"><tt><b>spaceAfter</b></tt></a>
981
+ </div>
982
+ <div class="member-description hidden">
983
+
984
+ <div class="member-text">
985
+ <p>The space below the paragraph.</p>
986
+
987
+
988
+
989
+ <ul class="member-list">
990
+ <h4>Default:</h4>
991
+ <li><tt>0</tt></li>
992
+ </ul>
993
+
994
+ <ul class="member-list">
995
+ <h4>Type:</h4>
996
+ <li>
997
+ <tt>Number</tt>
998
+ </li>
999
+ </ul>
1000
+
1001
+
1002
+
1003
+ </div>
1004
+
1005
+ </div>
1006
+ </div>
1007
+
1008
+
1009
+ <div id="hyphenation" class="member">
1010
+ <div class="member-link">
1011
+ <a name="hyphenation" href="#hyphenation"><tt><b>hyphenation</b></tt></a>
1012
+ </div>
1013
+ <div class="member-description hidden">
1014
+
1015
+ <div class="member-text">
1016
+ <p>Whether words are hyphenated at the ends of lines, and how: <code>true</code>, or <code>{
1017
+ wordsLongerThan, afterFirst, beforeLast, limit, zone, capitalized }</code>. Kept for hosts: canvas text breaks only at soft hyphens.</p>
1018
+
1019
+
1020
+
1021
+ <ul class="member-list">
1022
+ <h4>Default:</h4>
1023
+ <li><tt>false</tt></li>
1024
+ </ul>
1025
+
1026
+ <ul class="member-list">
1027
+ <h4>Type:</h4>
1028
+ <li>
1029
+ <tt>Boolean</tt>⟋<tt>Object</tt>
1030
+ </li>
1031
+ </ul>
1032
+
1033
+
1034
+
1035
+ </div>
1036
+
1037
+ </div>
1038
+ </div>
1039
+
1040
+
1041
+ <div id="composer" class="member">
1042
+ <div class="member-link">
1043
+ <a name="composer" href="#composer"><tt><b>composer</b></tt></a>
1044
+ </div>
1045
+ <div class="member-description hidden">
1046
+
1047
+ <div class="member-text">
1048
+ <p>How lines are broken: one line at a time, or all of the paragraph&rsquo;s lines together, for the most even spacing. Kept for hosts: canvas text breaks one line at a time.</p>
1049
+
1050
+
1051
+ <ul class="member-list">
1052
+ <h4>Values:</h4>
1053
+ <li><tt>'line'</tt>, <tt>'paragraph'</tt></li>
1054
+ </ul>
1055
+
1056
+
1057
+ <ul class="member-list">
1058
+ <h4>Default:</h4>
1059
+ <li><tt>'paragraph'</tt></li>
1060
+ </ul>
1061
+
1062
+ <ul class="member-list">
1063
+ <h4>Type:</h4>
1064
+ <li>
1065
+ <tt>String</tt>
1066
+ </li>
1067
+ </ul>
1068
+
1069
+
1070
+
1071
+ </div>
1072
+
1073
+ </div>
1074
+ </div>
1075
+
1076
+
1077
+ <div id="linewrap" class="member">
1078
+ <div class="member-link">
1079
+ <a name="linewrap" href="#linewrap"><tt><b>lineWrap</b></tt></a>
1080
+ </div>
1081
+ <div class="member-description hidden">
1082
+
1083
+ <div class="member-text">
1084
+ <p>How the lines of a paragraph in an area are evened out: <code>&#39;normal&#39;</code> fills each line as far as it goes, <code>&#39;balance&#39;</code> makes them all about as long, and <code>&#39;pretty&#39;</code> balances the last four lines when the last one is shorter than a third of the one before. Both keep the paragraph&rsquo;s number of lines.</p>
1085
+
1086
+
1087
+ <ul class="member-list">
1088
+ <h4>Values:</h4>
1089
+ <li><tt>'normal'</tt>, <tt>'balance'</tt>, <tt>'pretty'</tt></li>
1090
+ </ul>
1091
+
1092
+
1093
+ <ul class="member-list">
1094
+ <h4>Default:</h4>
1095
+ <li><tt>'normal'</tt></li>
1096
+ </ul>
1097
+
1098
+ <ul class="member-list">
1099
+ <h4>Type:</h4>
1100
+ <li>
1101
+ <tt>String</tt>
1102
+ </li>
1103
+ </ul>
1104
+
1105
+
1106
+
1107
+ </div>
1108
+
1109
+ </div>
1110
+ </div>
1111
+
1112
+
1113
+ <div id="tabs" class="member">
1114
+ <div class="member-link">
1115
+ <a name="tabs" href="#tabs"><tt><b>tabs</b></tt></a>
1116
+ </div>
1117
+ <div class="member-description hidden">
1118
+
1119
+ <div class="member-text">
1120
+ <p>The paragraph&rsquo;s tab stops: <code>[{ position, align, leader }]</code>, with <code>align</code> one of <code>&#39;left&#39;</code>, <code>&#39;center&#39;</code>, <code>&#39;right&#39;</code> and <code>&#39;decimal&#39;</code>. Kept for hosts: canvas text doesn&rsquo;t set tabs yet.</p>
1121
+
1122
+
1123
+
1124
+ <ul class="member-list">
1125
+ <h4>Default:</h4>
1126
+ <li><tt>null</tt></li>
1127
+ </ul>
1128
+
1129
+ <ul class="member-list">
1130
+ <h4>Type:</h4>
1131
+ <li>
1132
+ Array of <tt>Object</tt> objects
1133
+ </li>
1134
+ </ul>
1135
+
1136
+
1137
+
1138
+ </div>
1139
+
1140
+ </div>
1141
+ </div>
1142
+
1143
+
1144
+ <div id="direction" class="member">
1145
+ <div class="member-link">
1146
+ <a name="direction" href="#direction"><tt><b>direction</b></tt></a>
1147
+ </div>
1148
+ <div class="member-description hidden">
1149
+
1150
+ <div class="member-text">
1151
+ <p>The direction the paragraph&rsquo;s lines run in, which <code>&#39;start&#39;</code> and <code>&#39;end&#39;</code> follow; <code>null</code> for left to right.</p>
1152
+
1153
+
1154
+ <ul class="member-list">
1155
+ <h4>Values:</h4>
1156
+ <li><tt>'ltr'</tt>, <tt>'rtl'</tt></li>
1157
+ </ul>
1158
+
1159
+
1160
+ <ul class="member-list">
1161
+ <h4>Default:</h4>
1162
+ <li><tt>null</tt></li>
1163
+ </ul>
1164
+
1165
+ <ul class="member-list">
1166
+ <h4>Type:</h4>
1167
+ <li>
1168
+ <tt>String</tt>
1169
+ </li>
1170
+ </ul>
1171
+
1172
+
1173
+
1174
+ </div>
1175
+
1176
+ </div>
1177
+ </div>
1178
+
1179
+
1180
+ <h3>Content</h3>
1181
+
1182
+ <div id="content" class="member">
1183
+ <div class="member-link">
1184
+ <a name="content" href="#content"><tt><b>content</b></tt></a>
1185
+ </div>
1186
+ <div class="member-description hidden">
1187
+
1188
+ <div class="member-text">
1189
+ <p>The text of the item&rsquo;s story, see <a href="../classes/TextStory.html#content"><tt>textStory.content</tt></a>.</p>
1190
+
1191
+
1192
+
1193
+ <ul class="member-list">
1194
+ <h4>Type:</h4>
1195
+ <li>
1196
+ <tt>String</tt>
1197
+ </li>
1198
+ </ul>
1199
+
1200
+
1201
+
1202
+ </div>
1203
+
1204
+ </div>
1205
+ </div>
1206
+
1207
+
1208
+ <div id="runs" class="member">
1209
+ <div class="member-link">
1210
+ <a name="runs" href="#runs"><tt><b>runs</b></tt></a>
1211
+ </div>
1212
+ <div class="member-description hidden">
1213
+
1214
+ <div class="member-text">
1215
+ <p>The runs of the item&rsquo;s story, see <a href="../classes/TextStory.html#runs"><tt>textStory.runs</tt></a>.</p>
1216
+
1217
+
1218
+
1219
+ <ul class="member-list">
1220
+ <h4>Type:</h4>
1221
+ <li>
1222
+ Array of <a href="../classes/TextRange.html"><tt>TextRange</tt></a> objects
1223
+ </li>
1224
+ </ul>
1225
+
1226
+
1227
+
1228
+ </div>
1229
+
1230
+ </div>
1231
+ </div>
1232
+
1233
+
1234
+ <div id="paragraphs" class="member">
1235
+ <div class="member-link">
1236
+ <a name="paragraphs" href="#paragraphs"><tt><b>paragraphs</b></tt></a>
1237
+ </div>
1238
+ <div class="member-description hidden">
1239
+
1240
+ <div class="member-text">
1241
+ <p>The paragraphs of the item&rsquo;s story, see <a href="../classes/TextStory.html#paragraphs"><tt>textStory.paragraphs</tt></a>.</p>
1242
+
1243
+
1244
+
1245
+ <ul class="member-list">
1246
+ <h4>Type:</h4>
1247
+ <li>
1248
+ Array of <a href="../classes/TextRange.html"><tt>TextRange</tt></a> objects
1249
+ </li>
1250
+ </ul>
1251
+
1252
+
1253
+
1254
+ </div>
1255
+
1256
+ </div>
1257
+ </div>
1258
+
1259
+
1260
+ <div id="words" class="member">
1261
+ <div class="member-link">
1262
+ <a name="words" href="#words"><tt><b>words</b></tt></a>
1263
+ </div>
1264
+ <div class="member-description hidden">
1265
+
1266
+ <div class="member-text">
1267
+ <p>The words of the item&rsquo;s story, see <a href="../classes/TextStory.html#words"><tt>textStory.words</tt></a>.</p>
1268
+
1269
+
1270
+
1271
+ <ul class="member-list">
1272
+ <h4>Type:</h4>
1273
+ <li>
1274
+ Array of <a href="../classes/TextRange.html"><tt>TextRange</tt></a> objects
1275
+ </li>
1276
+ </ul>
1277
+
1278
+
1279
+
1280
+ </div>
1281
+
1282
+ </div>
1283
+ </div>
1284
+
1285
+
1286
+ <div id="letters" class="member">
1287
+ <div class="member-link">
1288
+ <a name="letters" href="#letters"><tt><b>letters</b></tt></a>
1289
+ </div>
1290
+ <div class="member-description hidden">
1291
+
1292
+ <div class="member-text">
1293
+ <p>The letters of the item&rsquo;s story, see <a href="../classes/TextStory.html#letters"><tt>textStory.letters</tt></a>.</p>
1294
+
1295
+
1296
+
1297
+ <ul class="member-list">
1298
+ <h4>Type:</h4>
1299
+ <li>
1300
+ Array of <a href="../classes/TextRange.html"><tt>TextRange</tt></a> objects
1301
+ </li>
1302
+ </ul>
1303
+
1304
+
1305
+
1306
+ </div>
1307
+
1308
+ </div>
1309
+ </div>
1310
+
1311
+ </div>
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+ <!-- ============================== methods ================================ -->
1318
+ <div class="reference-members">
1319
+ <h2>Methods</h2>
1320
+
1321
+
1322
+ <div id="link-next" class="member">
1323
+ <div class="member-link">
1324
+ <a name="link-next" href="#link-next"><tt><b>link</b>(next)</tt></a>
1325
+ </div>
1326
+ <div class="member-description hidden">
1327
+ <div class="member-text">
1328
+ <p>Links the text item <code>next</code> after this one, so the story flows on into it. Its own story joins the end of this one.</p>
1329
+
1330
+
1331
+ <ul class="member-list">
1332
+ <h4>Parameters:</h4>
1333
+
1334
+ <li>
1335
+ <tt>next:</tt>
1336
+ <a href="../classes/TextItem.html"><tt>TextItem</tt></a>
1337
+ &mdash;&nbsp;the text item to link
1338
+
1339
+ </li>
1340
+
1341
+ </ul>
1342
+
1343
+
1344
+ <ul class="member-list">
1345
+ <h4>Returns:</h4>
1346
+
1347
+ <li>
1348
+ <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the text item was linked, <tt>false</tt> otherwise
1349
+ </li>
1350
+
1351
+
1352
+ </ul>
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+ </div>
1359
+ </div>
1360
+ </div>
1361
+
1362
+
1363
+ <div id="islinked" class="member">
1364
+ <div class="member-link">
1365
+ <a name="islinked" href="#islinked"><tt><b>isLinked</b>()</tt></a>
1366
+ </div>
1367
+ <div class="member-description hidden">
1368
+ <div class="member-text">
1369
+ <p><tt>true</tt> if the text item is linked with others, <tt>false</tt> otherwise</p>
1370
+
1371
+
1372
+
1373
+ <ul class="member-list">
1374
+ <h4>Returns:</h4>
1375
+
1376
+ <li>
1377
+ <tt><tt>Boolean</tt></tt>
1378
+ </li>
1379
+
1380
+
1381
+ </ul>
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+ </div>
1388
+ </div>
1389
+ </div>
1390
+
1391
+
1392
+ <div id="unlink" class="member">
1393
+ <div class="member-link">
1394
+ <a name="unlink" href="#unlink"><tt><b>unlink</b>([which])</tt></a>
1395
+ </div>
1396
+ <div class="member-description hidden">
1397
+ <div class="member-text">
1398
+ <p>Unlinks the text item: <code>&#39;both&#39;</code> takes it out of its story, which flows on through the others, <code>&#39;before&#39;</code> and <code>&#39;after&#39;</code> break the story into two there.</p>
1399
+
1400
+
1401
+ <ul class="member-list">
1402
+ <h4>Parameters:</h4>
1403
+
1404
+ <li>
1405
+ <tt>which:</tt>
1406
+ <tt>String</tt>
1407
+ &mdash;&nbsp;<code>&#39;both&#39;</code>, <code>&#39;before&#39;</code> or <code>&#39;after&#39;</code>
1408
+ &mdash;&nbsp;optional, default: <tt>&lsquo;both&rsquo;</tt>
1409
+ </li>
1410
+
1411
+ </ul>
1412
+
1413
+
1414
+ <ul class="member-list">
1415
+ <h4>Returns:</h4>
1416
+
1417
+ <li>
1418
+ <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the text item was unlinked, <tt>false</tt> otherwise
1419
+ </li>
1420
+
1421
+
1422
+ </ul>
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+ </div>
1429
+ </div>
1430
+ </div>
1431
+
1432
+
1433
+ <div id="replace-content-start-end" class="member">
1434
+ <div class="member-link">
1435
+ <a name="replace-content-start-end" href="#replace-content-start-end"><tt><b>replace</b>(content, start, end)</tt></a>
1436
+ </div>
1437
+ <div class="member-description hidden">
1438
+ <div class="member-text">
1439
+ <p>Replaces the content from <code>start</code> to <code>end</code> of the item&rsquo;s story, see <a href="../classes/TextStory.html#replace-content-start-end"><tt>textStory.replace(content, start, end)</tt></a>.</p>
1440
+
1441
+
1442
+ <ul class="member-list">
1443
+ <h4>Parameters:</h4>
1444
+
1445
+ <li>
1446
+ <tt>content:</tt>
1447
+ <tt>String</tt>
1448
+ &mdash;&nbsp;the new content
1449
+
1450
+ </li>
1451
+
1452
+ <li>
1453
+ <tt>start:</tt>
1454
+ <tt>Number</tt>
1455
+ &mdash;&nbsp;the index of the first character to replace
1456
+
1457
+ </li>
1458
+
1459
+ <li>
1460
+ <tt>end:</tt>
1461
+ <tt>Number</tt>
1462
+ &mdash;&nbsp;the index after the last character to replace
1463
+
1464
+ </li>
1465
+
1466
+ </ul>
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+ </div>
1474
+ </div>
1475
+ </div>
1476
+
1477
+
1478
+ <div id="range-start-end" class="member">
1479
+ <div class="member-link">
1480
+ <a name="range-start-end" href="#range-start-end"><tt><b>range</b>(start, end)</tt></a>
1481
+ </div>
1482
+ <div class="member-description hidden">
1483
+ <div class="member-text">
1484
+ <p>The range of the item&rsquo;s story from <code>start</code> to <code>end</code>.</p>
1485
+
1486
+
1487
+ <ul class="member-list">
1488
+ <h4>Parameters:</h4>
1489
+
1490
+ <li>
1491
+ <tt>start:</tt>
1492
+ <tt>Number</tt>
1493
+ &mdash;&nbsp;the index of its first character
1494
+
1495
+ </li>
1496
+
1497
+ <li>
1498
+ <tt>end:</tt>
1499
+ <tt>Number</tt>
1500
+ &mdash;&nbsp;the index after its last character
1501
+
1502
+ </li>
1503
+
1504
+ </ul>
1505
+
1506
+
1507
+ <ul class="member-list">
1508
+ <h4>Returns:</h4>
1509
+
1510
+ <li>
1511
+ <tt><a href="../classes/TextRange.html"><tt>TextRange</tt></a></tt>
1512
+ </li>
1513
+
1514
+
1515
+ </ul>
1516
+
1517
+
1518
+
1519
+
1520
+
1521
+ </div>
1522
+ </div>
1523
+ </div>
1524
+
1525
+
1526
+
1527
+ </div>
302
1528
 
303
1529
 
304
1530
 
@@ -314,7 +1540,7 @@ function onMouseMove(event) {
314
1540
  <div class="member-description hidden">
315
1541
 
316
1542
  <div class="member-text">
317
- <p>The key of the host&rsquo;s node that the item represents, in a project backed by a host document, see <a href="../classes/Project.html#source"><tt>project.source</tt></a>. It can only be set once, on an item created by a script, to register the key that the host gave its new node.</p>
1543
+ <p>The key of the host&rsquo;s node that the item represents, in a project backed by a host document, see <a href="../classes/Project.html#host"><tt>project.host</tt></a>. It can only be set once, on an item created by a script, to register the key that the host gave its new node.</p>
318
1544
 
319
1545
 
320
1546
 
@@ -419,7 +1645,7 @@ function onMouseMove(event) {
419
1645
  <div class="button run">Run</div>
420
1646
  </div>
421
1647
 
422
- <script type="text/paperscript" canvas="canvas-2">
1648
+ <script type="text/paperscript" canvas="canvas-0">
423
1649
  var path = new Path.Circle({
424
1650
  center: [80, 50],
425
1651
  radius: 35
@@ -434,7 +1660,7 @@ group.addChild(path);
434
1660
  // The path can be accessed by name:
435
1661
  group.children['example'].fillColor = 'red';
436
1662
  </script>
437
- <div class="canvas"><canvas width="516" height="100" id="canvas-2"></canvas></div>
1663
+ <div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
438
1664
  </div>
439
1665
 
440
1666
 
@@ -472,7 +1698,7 @@ group.children['example'].fillColor = 'red';
472
1698
  <div class="button run">Run</div>
473
1699
  </div>
474
1700
 
475
- <script type="text/paperscript" canvas="canvas-3">
1701
+ <script type="text/paperscript" canvas="canvas-1">
476
1702
  var circle = new Path.Circle({
477
1703
  center: [80, 50],
478
1704
  radius: 30
@@ -483,7 +1709,7 @@ circle.style = {
483
1709
  strokeWidth: 5
484
1710
  };
485
1711
  </script>
486
- <div class="canvas"><canvas width="516" height="100" id="canvas-3"></canvas></div>
1712
+ <div class="canvas"><canvas width="516" height="100" id="canvas-1"></canvas></div>
487
1713
  </div>
488
1714
 
489
1715
 
@@ -495,7 +1721,7 @@ circle.style = {
495
1721
  <div class="button run">Run</div>
496
1722
  </div>
497
1723
 
498
- <script type="text/paperscript" canvas="canvas-4">
1724
+ <script type="text/paperscript" canvas="canvas-2">
499
1725
  var path = new Path.Circle({
500
1726
  center: [50, 50],
501
1727
  radius: 30,
@@ -510,7 +1736,7 @@ var path2 = new Path.Circle({
510
1736
  // Copy the path style of path:
511
1737
  path2.style = path.style;
512
1738
  </script>
513
- <div class="canvas"><canvas width="516" height="100" id="canvas-4"></canvas></div>
1739
+ <div class="canvas"><canvas width="516" height="100" id="canvas-2"></canvas></div>
514
1740
  </div>
515
1741
 
516
1742
 
@@ -522,7 +1748,7 @@ path2.style = path.style;
522
1748
  <div class="button run">Run</div>
523
1749
  </div>
524
1750
 
525
- <script type="text/paperscript" canvas="canvas-5">
1751
+ <script type="text/paperscript" canvas="canvas-3">
526
1752
  var myStyle = {
527
1753
  fillColor: 'red',
528
1754
  strokeColor: 'blue',
@@ -541,7 +1767,7 @@ var path2 = new Path.Circle({
541
1767
  });
542
1768
  path2.style = myStyle;
543
1769
  </script>
544
- <div class="canvas"><canvas width="516" height="100" id="canvas-5"></canvas></div>
1770
+ <div class="canvas"><canvas width="516" height="100" id="canvas-3"></canvas></div>
545
1771
  </div>
546
1772
 
547
1773
 
@@ -583,7 +1809,7 @@ path2.style = myStyle;
583
1809
  <div class="button run">Run</div>
584
1810
  </div>
585
1811
 
586
- <script type="text/paperscript" canvas="canvas-6">
1812
+ <script type="text/paperscript" canvas="canvas-4">
587
1813
  var unlockedItem = new Path.Circle({
588
1814
  center: view.center - [35, 0],
589
1815
  radius: 30,
@@ -610,7 +1836,7 @@ new PointText({
610
1836
  justification: 'center'
611
1837
  });
612
1838
  </script>
613
- <div class="canvas"><canvas width="516" height="100" id="canvas-6"></canvas></div>
1839
+ <div class="canvas"><canvas width="516" height="100" id="canvas-4"></canvas></div>
614
1840
  </div>
615
1841
 
616
1842
 
@@ -652,7 +1878,7 @@ new PointText({
652
1878
  <div class="button run">Run</div>
653
1879
  </div>
654
1880
 
655
- <script type="text/paperscript" canvas="canvas-7">
1881
+ <script type="text/paperscript" canvas="canvas-5">
656
1882
  var path = new Path.Circle({
657
1883
  center: [50, 50],
658
1884
  radius: 20,
@@ -662,7 +1888,7 @@ var path = new Path.Circle({
662
1888
  // Hide the path:
663
1889
  path.visible = false;
664
1890
  </script>
665
- <div class="canvas"><canvas width="516" height="100" id="canvas-7"></canvas></div>
1891
+ <div class="canvas"><canvas width="516" height="100" id="canvas-5"></canvas></div>
666
1892
  </div>
667
1893
 
668
1894
 
@@ -679,7 +1905,7 @@ path.visible = false;
679
1905
  <div class="member-description hidden">
680
1906
 
681
1907
  <div class="member-text">
682
- <p>The blend mode with which the item is composited onto the canvas. Both the standard canvas compositing modes, as well as the new CSS blend modes are supported. If blend-modes cannot be rendered natively, they are emulated. Be aware that emulation can have an impact on performance.</p>
1908
+ <p>The blend mode with which the item is composited onto the canvas. Both the standard canvas compositing modes, as well as the new CSS blend modes are supported. Where the canvas doesn&rsquo;t support a CSS blend mode natively, it draws as <code>&#39;normal&#39;</code>. Paper.js&rsquo;s own modes <code>&#39;add&#39;</code>, <code>&#39;subtract&#39;</code>, <code>&#39;average&#39;</code>, <code>&#39;pin-light&#39;</code> and <code>&#39;negation&#39;</code> are emulated, which can have an impact on performance.</p>
683
1909
 
684
1910
 
685
1911
  <ul class="member-list">
@@ -710,7 +1936,7 @@ path.visible = false;
710
1936
  <div class="button run">Run</div>
711
1937
  </div>
712
1938
 
713
- <script type="text/paperscript" canvas="canvas-8">
1939
+ <script type="text/paperscript" canvas="canvas-6">
714
1940
  // Create a white rectangle in the background
715
1941
  // with the same dimensions as the view:
716
1942
  var background = new Path.Rectangle(view.bounds);
@@ -731,7 +1957,7 @@ var circle2 = new Path.Circle({
731
1957
  // Set the blend mode of circle2:
732
1958
  circle2.blendMode = 'multiply';
733
1959
  </script>
734
- <div class="canvas"><canvas width="516" height="100" id="canvas-8"></canvas></div>
1960
+ <div class="canvas"><canvas width="516" height="100" id="canvas-6"></canvas></div>
735
1961
  </div>
736
1962
 
737
1963
 
@@ -773,7 +1999,7 @@ circle2.blendMode = 'multiply';
773
1999
  <div class="button run">Run</div>
774
2000
  </div>
775
2001
 
776
- <script type="text/paperscript" canvas="canvas-9">
2002
+ <script type="text/paperscript" canvas="canvas-7">
777
2003
  var circle = new Path.Circle({
778
2004
  center: [80, 50],
779
2005
  radius: 35,
@@ -791,7 +2017,7 @@ var circle2 = new Path.Circle({
791
2017
  // Make circle2 50% transparent:
792
2018
  circle2.opacity = 0.5;
793
2019
  </script>
794
- <div class="canvas"><canvas width="516" height="100" id="canvas-9"></canvas></div>
2020
+ <div class="canvas"><canvas width="516" height="100" id="canvas-7"></canvas></div>
795
2021
  </div>
796
2022
 
797
2023
 
@@ -832,6 +2058,42 @@ circle2.opacity = 0.5;
832
2058
  </div>
833
2059
 
834
2060
 
2061
+ <div id="textwrap" class="member">
2062
+ <div class="member-link">
2063
+ <a name="textwrap" href="#textwrap"><tt><b>textWrap</b></tt></a>
2064
+ </div>
2065
+ <div class="member-description hidden">
2066
+
2067
+ <div class="member-text">
2068
+ <p>Specifies whether, and how, the item pushes aside the text of the <a href="../classes/AreaText.html"><tt>AreaText</tt></a> items below it in its layer: <code>null</code>, or an object with <code>offset</code>, the space kept between them, and <code>invert</code>, to let the text flow inside it instead. <code>true</code> sets the defaults.</p>
2069
+
2070
+
2071
+
2072
+ <ul class="member-list">
2073
+ <h4>Default:</h4>
2074
+ <li><tt>null</tt></li>
2075
+ </ul>
2076
+
2077
+ <ul class="member-list">
2078
+ <h4>Type:</h4>
2079
+ <li>
2080
+ <tt>Object</tt>
2081
+ </li>
2082
+ </ul>
2083
+
2084
+
2085
+ <h4>Example:</h4>
2086
+
2087
+
2088
+ <pre><code>var circle = new Path.Circle({ center: [100, 100], radius: 40 });
2089
+ circle.textWrap = { offset: 10 };</code></pre>
2090
+
2091
+ </div>
2092
+
2093
+ </div>
2094
+ </div>
2095
+
2096
+
835
2097
  <div id="selected" class="member">
836
2098
  <div class="member-link">
837
2099
  <a name="selected" href="#selected"><tt><b>selected</b></tt></a>
@@ -878,17 +2140,43 @@ circle2.opacity = 0.5;
878
2140
  <div class="button run">Run</div>
879
2141
  </div>
880
2142
 
881
- <script type="text/paperscript" canvas="canvas-10">
2143
+ <script type="text/paperscript" canvas="canvas-8">
882
2144
  var path = new Path.Circle({
883
2145
  center: [80, 50],
884
2146
  radius: 35
885
2147
  });
886
2148
  path.selected = true; // Select the path
887
2149
  </script>
888
- <div class="canvas"><canvas width="516" height="100" id="canvas-10"></canvas></div>
2150
+ <div class="canvas"><canvas width="516" height="100" id="canvas-8"></canvas></div>
2151
+ </div>
2152
+
2153
+
2154
+ </div>
2155
+
2156
+ </div>
889
2157
  </div>
890
2158
 
2159
+
2160
+ <div id="fullyselected" class="member">
2161
+ <div class="member-link">
2162
+ <a name="fullyselected" href="#fullyselected"><tt><b>fullySelected</b></tt></a>
2163
+ </div>
2164
+ <div class="member-description hidden">
891
2165
 
2166
+ <div class="member-text">
2167
+ <p>Specifies whether the item and all its descendants are selected. Setting it selects or deselects them all.</p>
2168
+
2169
+
2170
+
2171
+ <ul class="member-list">
2172
+ <h4>Type:</h4>
2173
+ <li>
2174
+ <tt>Boolean</tt>
2175
+ </li>
2176
+ </ul>
2177
+
2178
+
2179
+
892
2180
  </div>
893
2181
 
894
2182
  </div>
@@ -1016,7 +2304,7 @@ console.log(path.data.pets.length); // 1</code></pre>
1016
2304
  <div class="button run">Run</div>
1017
2305
  </div>
1018
2306
 
1019
- <script type="text/paperscript" canvas="canvas-11">
2307
+ <script type="text/paperscript" canvas="canvas-9">
1020
2308
  // Create a circle at position { x: 10, y: 10 }
1021
2309
  var circle = new Path.Circle({
1022
2310
  center: new Point(10, 10),
@@ -1030,7 +2318,7 @@ circle.position = new Point(20, 20);
1030
2318
  // Move the circle 100 points to the right and 50 points down
1031
2319
  circle.position += new Point(100, 50);
1032
2320
  </script>
1033
- <div class="canvas"><canvas width="516" height="100" id="canvas-11"></canvas></div>
2321
+ <div class="canvas"><canvas width="516" height="100" id="canvas-9"></canvas></div>
1034
2322
  </div>
1035
2323
 
1036
2324
 
@@ -1042,7 +2330,7 @@ circle.position += new Point(100, 50);
1042
2330
  <div class="button run">Run</div>
1043
2331
  </div>
1044
2332
 
1045
- <script type="text/paperscript" canvas="canvas-12">
2333
+ <script type="text/paperscript" canvas="canvas-10">
1046
2334
  // Create a circle at position { x: 20, y: 20 }
1047
2335
  var circle = new Path.Circle({
1048
2336
  center: new Point(20, 20),
@@ -1053,7 +2341,7 @@ var circle = new Path.Circle({
1053
2341
  // Move the circle 100 points to the right
1054
2342
  circle.position.x += 100;
1055
2343
  </script>
1056
- <div class="canvas"><canvas width="516" height="100" id="canvas-12"></canvas></div>
2344
+ <div class="canvas"><canvas width="516" height="100" id="canvas-10"></canvas></div>
1057
2345
  </div>
1058
2346
 
1059
2347
 
@@ -1128,6 +2416,7 @@ circle.position.x += 100;
1128
2416
 
1129
2417
  <div class="member-text">
1130
2418
  <p>The bounding rectangle of the item including stroke width.</p>
2419
+ <p>Setting it fits the item&rsquo;s <a href="../classes/Item.html#bounds"><tt>bounds</tt></a> into the given rectangle minus the extent of the stroke on each side, also where this extent changes with the item&rsquo;s proportions, as with miters. A rectangle smaller than the stroke itself shrinks the bounds to its center.</p>
1131
2420
 
1132
2421
 
1133
2422
 
@@ -1578,7 +2867,7 @@ console.log(group.children[0] == path); // true</code></pre>
1578
2867
  <div class="button run">Run</div>
1579
2868
  </div>
1580
2869
 
1581
- <script type="text/paperscript" canvas="canvas-13">
2870
+ <script type="text/paperscript" canvas="canvas-11">
1582
2871
  var path = new Path.Circle({
1583
2872
  center: [80, 50],
1584
2873
  radius: 35
@@ -1591,7 +2880,7 @@ group.addChild(path);
1591
2880
  // Access the path through the group's children array:
1592
2881
  group.children[0].fillColor = 'red';
1593
2882
  </script>
1594
- <div class="canvas"><canvas width="516" height="100" id="canvas-13"></canvas></div>
2883
+ <div class="canvas"><canvas width="516" height="100" id="canvas-11"></canvas></div>
1595
2884
  </div>
1596
2885
 
1597
2886
 
@@ -1603,7 +2892,7 @@ group.children[0].fillColor = 'red';
1603
2892
  <div class="button run">Run</div>
1604
2893
  </div>
1605
2894
 
1606
- <script type="text/paperscript" canvas="canvas-14">
2895
+ <script type="text/paperscript" canvas="canvas-12">
1607
2896
  var path = new Path.Circle({
1608
2897
  center: [80, 50],
1609
2898
  radius: 35
@@ -1618,7 +2907,7 @@ group.addChild(path);
1618
2907
  // The path can be accessed by name:
1619
2908
  group.children['example'].fillColor = 'orange';
1620
2909
  </script>
1621
- <div class="canvas"><canvas width="516" height="100" id="canvas-14"></canvas></div>
2910
+ <div class="canvas"><canvas width="516" height="100" id="canvas-12"></canvas></div>
1622
2911
  </div>
1623
2912
 
1624
2913
 
@@ -1630,7 +2919,7 @@ group.children['example'].fillColor = 'orange';
1630
2919
  <div class="button run">Run</div>
1631
2920
  </div>
1632
2921
 
1633
- <script type="text/paperscript" canvas="canvas-15">
2922
+ <script type="text/paperscript" canvas="canvas-13">
1634
2923
  var path = new Path.Circle({
1635
2924
  center: [80, 50],
1636
2925
  radius: 35
@@ -1642,7 +2931,7 @@ group.children = [path];
1642
2931
  // The path is the first child of the group:
1643
2932
  group.firstChild.fillColor = 'green';
1644
2933
  </script>
1645
- <div class="canvas"><canvas width="516" height="100" id="canvas-15"></canvas></div>
2934
+ <div class="canvas"><canvas width="516" height="100" id="canvas-13"></canvas></div>
1646
2935
  </div>
1647
2936
 
1648
2937
 
@@ -1819,7 +3108,7 @@ group.firstChild.fillColor = 'green';
1819
3108
  <div class="button run">Run</div>
1820
3109
  </div>
1821
3110
 
1822
- <script type="text/paperscript" canvas="canvas-16">
3111
+ <script type="text/paperscript" canvas="canvas-14">
1823
3112
  // Create a circle shaped path at { x: 80, y: 50 }
1824
3113
  // with a radius of 35:
1825
3114
  var circle = new Path.Circle({
@@ -1830,7 +3119,7 @@ var circle = new Path.Circle({
1830
3119
  // Set its stroke color to RGB red:
1831
3120
  circle.strokeColor = new Color(1, 0, 0);
1832
3121
  </script>
1833
- <div class="canvas"><canvas width="516" height="100" id="canvas-16"></canvas></div>
3122
+ <div class="canvas"><canvas width="516" height="100" id="canvas-14"></canvas></div>
1834
3123
  </div>
1835
3124
 
1836
3125
 
@@ -1867,7 +3156,7 @@ circle.strokeColor = new Color(1, 0, 0);
1867
3156
  <div class="button run">Run</div>
1868
3157
  </div>
1869
3158
 
1870
- <script type="text/paperscript" canvas="canvas-17">
3159
+ <script type="text/paperscript" canvas="canvas-15">
1871
3160
  // Create a circle shaped path at { x: 80, y: 50 }
1872
3161
  // with a radius of 35:
1873
3162
  var circle = new Path.Circle({
@@ -1879,7 +3168,7 @@ var circle = new Path.Circle({
1879
3168
  // Set its stroke width to 10:
1880
3169
  circle.strokeWidth = 10;
1881
3170
  </script>
1882
- <div class="canvas"><canvas width="516" height="100" id="canvas-17"></canvas></div>
3171
+ <div class="canvas"><canvas width="516" height="100" id="canvas-15"></canvas></div>
1883
3172
  </div>
1884
3173
 
1885
3174
 
@@ -1926,7 +3215,7 @@ circle.strokeWidth = 10;
1926
3215
  <div class="button run">Run</div>
1927
3216
  </div>
1928
3217
 
1929
- <script type="text/paperscript" canvas="canvas-18">
3218
+ <script type="text/paperscript" canvas="canvas-16">
1930
3219
  var line = new Path({
1931
3220
  segments: [[80, 50], [420, 50]],
1932
3221
  strokeColor: 'black',
@@ -1947,7 +3236,7 @@ var line2 = line.clone();
1947
3236
  line2.position.y += 100;
1948
3237
  line2.strokeCap = 'butt';
1949
3238
  </script>
1950
- <div class="canvas"><canvas width="516" height="200" id="canvas-18"></canvas></div>
3239
+ <div class="canvas"><canvas width="516" height="200" id="canvas-16"></canvas></div>
1951
3240
  </div>
1952
3241
 
1953
3242
 
@@ -1994,7 +3283,7 @@ line2.strokeCap = 'butt';
1994
3283
  <div class="button run">Run</div>
1995
3284
  </div>
1996
3285
 
1997
- <script type="text/paperscript" canvas="canvas-19">
3286
+ <script type="text/paperscript" canvas="canvas-17">
1998
3287
  var path = new Path({
1999
3288
  segments: [[80, 100], [120, 40], [160, 100]],
2000
3289
  strokeColor: 'black',
@@ -2011,7 +3300,7 @@ var path3 = path2.clone();
2011
3300
  path3.position.x += path3.bounds.width * 1.5;
2012
3301
  path3.strokeJoin = 'bevel';
2013
3302
  </script>
2014
- <div class="canvas"><canvas width="516" height="120" id="canvas-19"></canvas></div>
3303
+ <div class="canvas"><canvas width="516" height="120" id="canvas-17"></canvas></div>
2015
3304
  </div>
2016
3305
 
2017
3306
 
@@ -2115,7 +3404,7 @@ path3.strokeJoin = 'bevel';
2115
3404
  <div class="button run">Run</div>
2116
3405
  </div>
2117
3406
 
2118
- <script type="text/paperscript" canvas="canvas-20">
3407
+ <script type="text/paperscript" canvas="canvas-18">
2119
3408
  var path = new Path.Circle({
2120
3409
  center: [80, 50],
2121
3410
  radius: 40,
@@ -2126,7 +3415,7 @@ var path = new Path.Circle({
2126
3415
  // Set the dashed stroke to [10pt dash, 4pt gap]:
2127
3416
  path.dashArray = [10, 4];
2128
3417
  </script>
2129
- <div class="canvas"><canvas width="516" height="100" id="canvas-20"></canvas></div>
3418
+ <div class="canvas"><canvas width="516" height="100" id="canvas-18"></canvas></div>
2130
3419
  </div>
2131
3420
 
2132
3421
 
@@ -2196,7 +3485,7 @@ path.dashArray = [10, 4];
2196
3485
  <div class="button run">Run</div>
2197
3486
  </div>
2198
3487
 
2199
- <script type="text/paperscript" canvas="canvas-21">
3488
+ <script type="text/paperscript" canvas="canvas-19">
2200
3489
  // Create a circle shaped path at { x: 80, y: 50 }
2201
3490
  // with a radius of 35:
2202
3491
  var circle = new Path.Circle({
@@ -2207,7 +3496,7 @@ var circle = new Path.Circle({
2207
3496
  // Set the fill color of the circle to RGB red:
2208
3497
  circle.fillColor = new Color(1, 0, 0);
2209
3498
  </script>
2210
- <div class="canvas"><canvas width="516" height="100" id="canvas-21"></canvas></div>
3499
+ <div class="canvas"><canvas width="516" height="100" id="canvas-19"></canvas></div>
2211
3500
  </div>
2212
3501
 
2213
3502
 
@@ -2282,7 +3571,7 @@ circle.fillColor = new Color(1, 0, 0);
2282
3571
  <div class="button run">Run</div>
2283
3572
  </div>
2284
3573
 
2285
- <script type="text/paperscript" canvas="canvas-22">
3574
+ <script type="text/paperscript" canvas="canvas-20">
2286
3575
  var circle = new Path.Circle({
2287
3576
  center: [80, 50],
2288
3577
  radius: 35,
@@ -2295,7 +3584,7 @@ var circle = new Path.Circle({
2295
3584
  shadowOffset: new Point(5, 5)
2296
3585
  });
2297
3586
  </script>
2298
- <div class="canvas"><canvas width="516" height="100" id="canvas-22"></canvas></div>
3587
+ <div class="canvas"><canvas width="516" height="100" id="canvas-20"></canvas></div>
2299
3588
  </div>
2300
3589
 
2301
3590
 
@@ -2436,7 +3725,7 @@ var circle = new Path.Circle({
2436
3725
  <div class="button run">Run</div>
2437
3726
  </div>
2438
3727
 
2439
- <script type="text/paperscript" canvas="canvas-23">
3728
+ <script type="text/paperscript" canvas="canvas-21">
2440
3729
  // Create a rectangle shaped path with its top left point at:
2441
3730
  // {x: 50, y: 25} and a size of {width: 50, height: 50}
2442
3731
  var path = new Path.Rectangle(new Point(50, 25), new Size(50, 50));
@@ -2447,7 +3736,7 @@ path.onFrame = function(event) {
2447
3736
  this.rotate(3);
2448
3737
  }
2449
3738
  </script>
2450
- <div class="canvas"><canvas width="516" height="100" id="canvas-23"></canvas></div>
3739
+ <div class="canvas"><canvas width="516" height="100" id="canvas-21"></canvas></div>
2451
3740
  </div>
2452
3741
 
2453
3742
 
@@ -2491,7 +3780,7 @@ path.onFrame = function(event) {
2491
3780
  <div class="button run">Run</div>
2492
3781
  </div>
2493
3782
 
2494
- <script type="text/paperscript" canvas="canvas-24">
3783
+ <script type="text/paperscript" canvas="canvas-22">
2495
3784
  // Create a circle shaped path at the center of the view:
2496
3785
  var path = new Path.Circle({
2497
3786
  center: view.center,
@@ -2505,7 +3794,7 @@ path.onMouseDown = function(event) {
2505
3794
  this.fillColor = 'red';
2506
3795
  }
2507
3796
  </script>
2508
- <div class="canvas"><canvas width="516" height="100" id="canvas-24"></canvas></div>
3797
+ <div class="canvas"><canvas width="516" height="100" id="canvas-22"></canvas></div>
2509
3798
  </div>
2510
3799
 
2511
3800
 
@@ -2517,7 +3806,7 @@ path.onMouseDown = function(event) {
2517
3806
  <div class="button run">Run</div>
2518
3807
  </div>
2519
3808
 
2520
- <script type="text/paperscript" canvas="canvas-25">
3809
+ <script type="text/paperscript" canvas="canvas-23">
2521
3810
  // Loop 30 times:
2522
3811
  for (var i = 0; i < 30; i++) {
2523
3812
  // Create a circle shaped path at a random position
@@ -2535,7 +3824,7 @@ for (var i = 0; i < 30; i++) {
2535
3824
  }
2536
3825
  }
2537
3826
  </script>
2538
- <div class="canvas"><canvas width="516" height="100" id="canvas-25"></canvas></div>
3827
+ <div class="canvas"><canvas width="516" height="100" id="canvas-23"></canvas></div>
2539
3828
  </div>
2540
3829
 
2541
3830
 
@@ -2579,7 +3868,7 @@ for (var i = 0; i < 30; i++) {
2579
3868
  <div class="button run">Run</div>
2580
3869
  </div>
2581
3870
 
2582
- <script type="text/paperscript" canvas="canvas-26">
3871
+ <script type="text/paperscript" canvas="canvas-24">
2583
3872
  // Create a circle shaped path at the center of the view:
2584
3873
  var path = new Path.Circle({
2585
3874
  center: view.center,
@@ -2592,7 +3881,7 @@ path.onMouseDrag = function(event) {
2592
3881
  path.position += event.delta;
2593
3882
  }
2594
3883
  </script>
2595
- <div class="canvas"><canvas width="516" height="240" id="canvas-26"></canvas></div>
3884
+ <div class="canvas"><canvas width="516" height="240" id="canvas-24"></canvas></div>
2596
3885
  </div>
2597
3886
 
2598
3887
 
@@ -2636,7 +3925,7 @@ path.onMouseDrag = function(event) {
2636
3925
  <div class="button run">Run</div>
2637
3926
  </div>
2638
3927
 
2639
- <script type="text/paperscript" canvas="canvas-27">
3928
+ <script type="text/paperscript" canvas="canvas-25">
2640
3929
  // Create a circle shaped path at the center of the view:
2641
3930
  var path = new Path.Circle({
2642
3931
  center: view.center,
@@ -2650,7 +3939,7 @@ path.onMouseUp = function(event) {
2650
3939
  this.fillColor = 'red';
2651
3940
  }
2652
3941
  </script>
2653
- <div class="canvas"><canvas width="516" height="100" id="canvas-27"></canvas></div>
3942
+ <div class="canvas"><canvas width="516" height="100" id="canvas-25"></canvas></div>
2654
3943
  </div>
2655
3944
 
2656
3945
 
@@ -2694,7 +3983,7 @@ path.onMouseUp = function(event) {
2694
3983
  <div class="button run">Run</div>
2695
3984
  </div>
2696
3985
 
2697
- <script type="text/paperscript" canvas="canvas-28">
3986
+ <script type="text/paperscript" canvas="canvas-26">
2698
3987
  // Create a circle shaped path at the center of the view:
2699
3988
  var path = new Path.Circle({
2700
3989
  center: view.center,
@@ -2708,7 +3997,7 @@ path.onClick = function(event) {
2708
3997
  this.fillColor = 'red';
2709
3998
  }
2710
3999
  </script>
2711
- <div class="canvas"><canvas width="516" height="100" id="canvas-28"></canvas></div>
4000
+ <div class="canvas"><canvas width="516" height="100" id="canvas-26"></canvas></div>
2712
4001
  </div>
2713
4002
 
2714
4003
 
@@ -2720,7 +4009,7 @@ path.onClick = function(event) {
2720
4009
  <div class="button run">Run</div>
2721
4010
  </div>
2722
4011
 
2723
- <script type="text/paperscript" canvas="canvas-29">
4012
+ <script type="text/paperscript" canvas="canvas-27">
2724
4013
  // Loop 30 times:
2725
4014
  for (var i = 0; i < 30; i++) {
2726
4015
  // Create a circle shaped path at a random position
@@ -2738,7 +4027,7 @@ for (var i = 0; i < 30; i++) {
2738
4027
  }
2739
4028
  }
2740
4029
  </script>
2741
- <div class="canvas"><canvas width="516" height="100" id="canvas-29"></canvas></div>
4030
+ <div class="canvas"><canvas width="516" height="100" id="canvas-27"></canvas></div>
2742
4031
  </div>
2743
4032
 
2744
4033
 
@@ -2782,7 +4071,7 @@ for (var i = 0; i < 30; i++) {
2782
4071
  <div class="button run">Run</div>
2783
4072
  </div>
2784
4073
 
2785
- <script type="text/paperscript" canvas="canvas-30">
4074
+ <script type="text/paperscript" canvas="canvas-28">
2786
4075
  // Create a circle shaped path at the center of the view:
2787
4076
  var path = new Path.Circle({
2788
4077
  center: view.center,
@@ -2796,7 +4085,7 @@ path.onDoubleClick = function(event) {
2796
4085
  this.fillColor = 'red';
2797
4086
  }
2798
4087
  </script>
2799
- <div class="canvas"><canvas width="516" height="100" id="canvas-30"></canvas></div>
4088
+ <div class="canvas"><canvas width="516" height="100" id="canvas-28"></canvas></div>
2800
4089
  </div>
2801
4090
 
2802
4091
 
@@ -2808,7 +4097,7 @@ path.onDoubleClick = function(event) {
2808
4097
  <div class="button run">Run</div>
2809
4098
  </div>
2810
4099
 
2811
- <script type="text/paperscript" canvas="canvas-31">
4100
+ <script type="text/paperscript" canvas="canvas-29">
2812
4101
  // Loop 30 times:
2813
4102
  for (var i = 0; i < 30; i++) {
2814
4103
  // Create a circle shaped path at a random position
@@ -2826,7 +4115,7 @@ for (var i = 0; i < 30; i++) {
2826
4115
  }
2827
4116
  }
2828
4117
  </script>
2829
- <div class="canvas"><canvas width="516" height="100" id="canvas-31"></canvas></div>
4118
+ <div class="canvas"><canvas width="516" height="100" id="canvas-29"></canvas></div>
2830
4119
  </div>
2831
4120
 
2832
4121
 
@@ -2870,7 +4159,7 @@ for (var i = 0; i < 30; i++) {
2870
4159
  <div class="button run">Run</div>
2871
4160
  </div>
2872
4161
 
2873
- <script type="text/paperscript" canvas="canvas-32">
4162
+ <script type="text/paperscript" canvas="canvas-30">
2874
4163
  // Create a circle shaped path at the center of the view:
2875
4164
  var path = new Path.Circle({
2876
4165
  center: view.center,
@@ -2884,7 +4173,7 @@ path.onMouseMove = function(event) {
2884
4173
  this.opacity = Math.random();
2885
4174
  }
2886
4175
  </script>
2887
- <div class="canvas"><canvas width="516" height="100" id="canvas-32"></canvas></div>
4176
+ <div class="canvas"><canvas width="516" height="100" id="canvas-30"></canvas></div>
2888
4177
  </div>
2889
4178
 
2890
4179
 
@@ -2928,7 +4217,7 @@ path.onMouseMove = function(event) {
2928
4217
  <div class="button run">Run</div>
2929
4218
  </div>
2930
4219
 
2931
- <script type="text/paperscript" canvas="canvas-33">
4220
+ <script type="text/paperscript" canvas="canvas-31">
2932
4221
  // Create a circle shaped path at the center of the view:
2933
4222
  var path = new Path.Circle({
2934
4223
  center: view.center,
@@ -2946,7 +4235,7 @@ path.onMouseLeave = function(event) {
2946
4235
  this.fillColor = 'black';
2947
4236
  }
2948
4237
  </script>
2949
- <div class="canvas"><canvas width="516" height="100" id="canvas-33"></canvas></div>
4238
+ <div class="canvas"><canvas width="516" height="100" id="canvas-31"></canvas></div>
2950
4239
  </div>
2951
4240
 
2952
4241
 
@@ -2958,7 +4247,7 @@ path.onMouseLeave = function(event) {
2958
4247
  <div class="button run">Run</div>
2959
4248
  </div>
2960
4249
 
2961
- <script type="text/paperscript" canvas="canvas-34">
4250
+ <script type="text/paperscript" canvas="canvas-32">
2962
4251
  function enter(event) {
2963
4252
  this.fillColor = 'red';
2964
4253
  }
@@ -2980,7 +4269,7 @@ function onMouseDown(event) {
2980
4269
  path.onMouseLeave = leave;
2981
4270
  }
2982
4271
  </script>
2983
- <div class="canvas"><canvas width="516" height="100" id="canvas-34"></canvas></div>
4272
+ <div class="canvas"><canvas width="516" height="100" id="canvas-32"></canvas></div>
2984
4273
  </div>
2985
4274
 
2986
4275
 
@@ -3024,7 +4313,7 @@ function onMouseDown(event) {
3024
4313
  <div class="button run">Run</div>
3025
4314
  </div>
3026
4315
 
3027
- <script type="text/paperscript" canvas="canvas-35">
4316
+ <script type="text/paperscript" canvas="canvas-33">
3028
4317
  // Create a circle shaped path at the center of the view:
3029
4318
  var path = new Path.Circle({
3030
4319
  center: view.center,
@@ -3037,7 +4326,7 @@ path.onMouseLeave = function(event) {
3037
4326
  this.fillColor = 'red';
3038
4327
  }
3039
4328
  </script>
3040
- <div class="canvas"><canvas width="516" height="100" id="canvas-35"></canvas></div>
4329
+ <div class="canvas"><canvas width="516" height="100" id="canvas-33"></canvas></div>
3041
4330
  </div>
3042
4331
 
3043
4332
 
@@ -3096,7 +4385,7 @@ path.onMouseLeave = function(event) {
3096
4385
  <div class="button run">Run</div>
3097
4386
  </div>
3098
4387
 
3099
- <script type="text/paperscript" canvas="canvas-36">
4388
+ <script type="text/paperscript" canvas="canvas-34">
3100
4389
  var circle = new Path.Circle({
3101
4390
  center: [80, 50],
3102
4391
  radius: 35
@@ -3109,7 +4398,7 @@ circle.set({
3109
4398
  selected: true
3110
4399
  });
3111
4400
  </script>
3112
- <div class="canvas"><canvas width="516" height="100" id="canvas-36"></canvas></div>
4401
+ <div class="canvas"><canvas width="516" height="100" id="canvas-34"></canvas></div>
3113
4402
  </div>
3114
4403
 
3115
4404
 
@@ -3165,7 +4454,7 @@ circle.set({
3165
4454
  <div class="button run">Run</div>
3166
4455
  </div>
3167
4456
 
3168
- <script type="text/paperscript" canvas="canvas-37">
4457
+ <script type="text/paperscript" canvas="canvas-35">
3169
4458
  var circle = new Path.Circle({
3170
4459
  center: [50, 50],
3171
4460
  radius: 10,
@@ -3180,7 +4469,7 @@ for (var i = 0; i < 20; i++) {
3180
4469
  copy.position.x += i * copy.bounds.width;
3181
4470
  }
3182
4471
  </script>
3183
- <div class="canvas"><canvas width="516" height="100" id="canvas-37"></canvas></div>
4472
+ <div class="canvas"><canvas width="516" height="100" id="canvas-35"></canvas></div>
3184
4473
  </div>
3185
4474
 
3186
4475
 
@@ -3267,9 +4556,9 @@ for (var i = 0; i < 20; i++) {
3267
4556
  <p>Rasterizes the item into a newly created Raster object. The item itself is not removed after rasterization.</p>
3268
4557
  <ul class="member-list">
3269
4558
  <h4>Options:</h4>
3270
- <li><tt>resolution: <tt>Number</tt></tt> &mdash; the desired resolution to be used when rasterizing, in pixels per inch (DPI). If not specified, the value of <code>view.resolution</code> is used by default. &mdash;&nbsp;default: <tt>view.resolution</tt></li>
3271
- <li><tt>raster: <a href="../classes/Raster.html"><tt>Raster</tt></a></tt> &mdash; specifies a raster to be reused when rasterizing. If the raster has the desired size already, then the underlying canvas is reused and no new memory needs to be allocated. If no raster is provided, a new raster item is created and returned instead. &mdash;&nbsp;default: <tt>null</tt></li>
3272
- <li><tt>insert: <tt>Boolean</tt></tt> &mdash; specifies whether the raster should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the rasterized item. &mdash;&nbsp;default: <tt>true</tt></li>
4559
+ <li><tt>options.resolution: <tt>Number</tt></tt> &mdash; the desired resolution to be used when rasterizing, in pixels per inch (DPI). If not specified, the value of <code>view.resolution</code> is used by default. &mdash;&nbsp;default: <tt>view.resolution</tt></li>
4560
+ <li><tt>options.raster: <a href="../classes/Raster.html"><tt>Raster</tt></a></tt> &mdash; specifies a raster to be reused when rasterizing. If the raster has the desired size already, then the underlying canvas is reused and no new memory needs to be allocated. If no raster is provided, a new raster item is created and returned instead. &mdash;&nbsp;default: <tt>null</tt></li>
4561
+ <li><tt>options.insert: <tt>Boolean</tt></tt> &mdash; specifies whether the raster should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the rasterized item. &mdash;&nbsp;default: <tt>true</tt></li>
3273
4562
  </ul>
3274
4563
 
3275
4564
  <ul class="member-list">
@@ -3306,7 +4595,7 @@ for (var i = 0; i < 20; i++) {
3306
4595
  <div class="button run">Run</div>
3307
4596
  </div>
3308
4597
 
3309
- <script type="text/paperscript" canvas="canvas-38">
4598
+ <script type="text/paperscript" canvas="canvas-36">
3310
4599
  var circle = new Path.Circle({
3311
4600
  center: [50, 50],
3312
4601
  radius: 5,
@@ -3323,7 +4612,7 @@ raster.position.x += 100;
3323
4612
  circle.scale(5);
3324
4613
  raster.scale(5);
3325
4614
  </script>
3326
- <div class="canvas"><canvas width="516" height="100" id="canvas-38"></canvas></div>
4615
+ <div class="canvas"><canvas width="516" height="100" id="canvas-36"></canvas></div>
3327
4616
  </div>
3328
4617
 
3329
4618
 
@@ -3377,7 +4666,7 @@ raster.scale(5);
3377
4666
  <div class="button run">Run</div>
3378
4667
  </div>
3379
4668
 
3380
- <script type="text/paperscript" canvas="canvas-39">
4669
+ <script type="text/paperscript" canvas="canvas-37">
3381
4670
  var path = new Path.Star({
3382
4671
  center: [50, 50],
3383
4672
  points: 12,
@@ -3398,7 +4687,7 @@ function onMouseDown(event) {
3398
4687
  }
3399
4688
  }
3400
4689
  </script>
3401
- <div class="canvas"><canvas width="516" height="100" id="canvas-39"></canvas></div>
4690
+ <div class="canvas"><canvas width="516" height="100" id="canvas-37"></canvas></div>
3402
4691
  </div>
3403
4692
 
3404
4693
 
@@ -3454,7 +4743,7 @@ function onMouseDown(event) {
3454
4743
  </div>
3455
4744
  <div class="member-description hidden">
3456
4745
  <div class="member-text">
3457
-
4746
+ <p>Checks whether the item overlaps with the given item: whether their outlines cross, or one contains the other, as <a href="../classes/Rectangle.html#intersects-rect"><tt>rectangle.intersects(rect)</tt></a> does for rectangles. Items other than paths and shapes are checked through their bounds. To only check whether outlines cross, use <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a>.</p>
3458
4747
 
3459
4748
 
3460
4749
  <ul class="member-list">
@@ -3474,7 +4763,7 @@ function onMouseDown(event) {
3474
4763
  <h4>Returns:</h4>
3475
4764
 
3476
4765
  <li>
3477
- <tt><tt>Boolean</tt></tt>
4766
+ <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the items overlap, <tt>false</tt> otherwise
3478
4767
  </li>
3479
4768
 
3480
4769
 
@@ -3970,6 +5259,7 @@ function onMouseDown(event) {
3970
5259
  <div class="member-text">
3971
5260
  <p>Converts the provided SVG content into Paper.js items and adds them to the this item&rsquo;s children list. Note that the item is not cleared first. You can call <a href="../classes/Item.html#removechildren"><tt>item.removeChildren</tt></a>() to do so.</p>
3972
5261
  <p><code>&lt;symbol&gt;</code> elements are imported as <a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a> items, and the <code>&lt;use&gt;</code> elements that place them as <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> items. The styles that <code>&lt;use&gt;</code> elements inherit don&rsquo;t reach the symbols&rsquo; content.</p>
5262
+ <p>URLs are fetched as they are, so validate URLs that come from untrusted sources first, especially on servers, where they could reach internal addresses.</p>
3973
5263
  <ul class="member-list">
3974
5264
  <h4>Options:</h4>
3975
5265
  <li><tt>options.expandShapes: <tt>Boolean</tt></tt> &mdash; whether imported shape items should be expanded to path items &mdash;&nbsp;default: <tt>false</tt></li>
@@ -4523,11 +5813,11 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4523
5813
 
4524
5814
  <div id="replacewith-item" class="member">
4525
5815
  <div class="member-link">
4526
- <a name="replacewith-item" href="#replacewith-item"><tt><b>replaceWith</b>(item)</tt></a>
5816
+ <a name="replacewith-item" href="#replacewith-item"><tt><b>replaceWith</b>(...item)</tt></a>
4527
5817
  </div>
4528
5818
  <div class="member-description hidden">
4529
5819
  <div class="member-text">
4530
- <p>Replaces this item with the provided new item which will takes its place in the project hierarchy instead.</p>
5820
+ <p>Replaces this item with the provided new items which will take its place in the project hierarchy instead, in the given order. This also ungroups a group, e.g. <code>group.replaceWith(…group.children)</code>, but note that the items keep their own matrices, see <a href="../classes/Group.html#ungroup"><tt>group.ungroup</tt></a>().</p>
4531
5821
 
4532
5822
 
4533
5823
  <ul class="member-list">
@@ -4536,7 +5826,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4536
5826
  <li>
4537
5827
  <tt>item:</tt>
4538
5828
  <a href="../classes/Item.html"><tt>Item</tt></a>
4539
- &mdash;&nbsp;the item that will replace this item
5829
+ &mdash;&nbsp;the items that will replace this item
4540
5830
 
4541
5831
  </li>
4542
5832
 
@@ -5259,7 +6549,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
5259
6549
  <div class="button run">Run</div>
5260
6550
  </div>
5261
6551
 
5262
- <script type="text/paperscript" canvas="canvas-40">
6552
+ <script type="text/paperscript" canvas="canvas-38">
5263
6553
  // Create a rectangle shaped path with its top left
5264
6554
  // point at {x: 80, y: 25} and a size of {width: 50, height: 50}:
5265
6555
  var path = new Path.Rectangle(new Point(80, 25), new Size(50, 50));
@@ -5268,7 +6558,7 @@ path.fillColor = 'black';
5268
6558
  // Rotate the path by 30 degrees:
5269
6559
  path.rotate(30);
5270
6560
  </script>
5271
- <div class="canvas"><canvas width="516" height="100" id="canvas-40"></canvas></div>
6561
+ <div class="canvas"><canvas width="516" height="100" id="canvas-38"></canvas></div>
5272
6562
  </div>
5273
6563
 
5274
6564
 
@@ -5280,7 +6570,7 @@ path.rotate(30);
5280
6570
  <div class="button run">Run</div>
5281
6571
  </div>
5282
6572
 
5283
- <script type="text/paperscript" canvas="canvas-41">
6573
+ <script type="text/paperscript" canvas="canvas-39">
5284
6574
  // Create a rectangle shaped path with its top left
5285
6575
  // point at {x: 175, y: 50} and a size of {width: 100, height: 100}:
5286
6576
  var topLeft = new Point(175, 50);
@@ -5302,7 +6592,7 @@ function onFrame(event) {
5302
6592
  path.rotate(3, view.center);
5303
6593
  }
5304
6594
  </script>
5305
- <div class="canvas"><canvas width="516" height="200" id="canvas-41"></canvas></div>
6595
+ <div class="canvas"><canvas width="516" height="200" id="canvas-39"></canvas></div>
5306
6596
  </div>
5307
6597
 
5308
6598
 
@@ -5351,7 +6641,7 @@ function onFrame(event) {
5351
6641
  <div class="button run">Run</div>
5352
6642
  </div>
5353
6643
 
5354
- <script type="text/paperscript" canvas="canvas-42">
6644
+ <script type="text/paperscript" canvas="canvas-40">
5355
6645
  // Create a circle shaped path at { x: 80, y: 50 }
5356
6646
  // with a radius of 20:
5357
6647
  var circle = new Path.Circle({
@@ -5363,7 +6653,7 @@ var circle = new Path.Circle({
5363
6653
  // Scale the path by 150% from its center point
5364
6654
  circle.scale(1.5);
5365
6655
  </script>
5366
- <div class="canvas"><canvas width="516" height="100" id="canvas-42"></canvas></div>
6656
+ <div class="canvas"><canvas width="516" height="100" id="canvas-40"></canvas></div>
5367
6657
  </div>
5368
6658
 
5369
6659
 
@@ -5375,7 +6665,7 @@ circle.scale(1.5);
5375
6665
  <div class="button run">Run</div>
5376
6666
  </div>
5377
6667
 
5378
- <script type="text/paperscript" canvas="canvas-43">
6668
+ <script type="text/paperscript" canvas="canvas-41">
5379
6669
  // Create a circle shaped path at { x: 80, y: 50 }
5380
6670
  // with a radius of 20:
5381
6671
  var circle = new Path.Circle({
@@ -5387,7 +6677,7 @@ var circle = new Path.Circle({
5387
6677
  // Scale the path 150% from its bottom left corner
5388
6678
  circle.scale(1.5, circle.bounds.bottomLeft);
5389
6679
  </script>
5390
- <div class="canvas"><canvas width="516" height="100" id="canvas-43"></canvas></div>
6680
+ <div class="canvas"><canvas width="516" height="100" id="canvas-41"></canvas></div>
5391
6681
  </div>
5392
6682
 
5393
6683
 
@@ -5443,7 +6733,7 @@ circle.scale(1.5, circle.bounds.bottomLeft);
5443
6733
  <div class="button run">Run</div>
5444
6734
  </div>
5445
6735
 
5446
- <script type="text/paperscript" canvas="canvas-44">
6736
+ <script type="text/paperscript" canvas="canvas-42">
5447
6737
  // Create a circle shaped path at { x: 100, y: 50 }
5448
6738
  // with a radius of 20:
5449
6739
  var circle = new Path.Circle({
@@ -5455,7 +6745,7 @@ var circle = new Path.Circle({
5455
6745
  // Scale the path horizontally by 300%
5456
6746
  circle.scale(3, 1);
5457
6747
  </script>
5458
- <div class="canvas"><canvas width="516" height="100" id="canvas-44"></canvas></div>
6748
+ <div class="canvas"><canvas width="516" height="100" id="canvas-42"></canvas></div>
5459
6749
  </div>
5460
6750
 
5461
6751
 
@@ -5893,7 +7183,7 @@ circle.scale(3, 1);
5893
7183
  <div class="button run">Run</div>
5894
7184
  </div>
5895
7185
 
5896
- <script type="text/paperscript" canvas="canvas-45">
7186
+ <script type="text/paperscript" canvas="canvas-43">
5897
7187
  // Create a rectangle shaped path with its top left corner
5898
7188
  // at {x: 80, y: 25} and a size of {width: 75, height: 50}:
5899
7189
  var path = new Path.Rectangle({
@@ -5914,7 +7204,7 @@ var circlePath = new Path.Circle({
5914
7204
  // the rectangular path:
5915
7205
  circlePath.fitBounds(path.bounds);
5916
7206
  </script>
5917
- <div class="canvas"><canvas width="516" height="100" id="canvas-45"></canvas></div>
7207
+ <div class="canvas"><canvas width="516" height="100" id="canvas-43"></canvas></div>
5918
7208
  </div>
5919
7209
 
5920
7210
 
@@ -5926,7 +7216,7 @@ circlePath.fitBounds(path.bounds);
5926
7216
  <div class="button run">Run</div>
5927
7217
  </div>
5928
7218
 
5929
- <script type="text/paperscript" canvas="canvas-46">
7219
+ <script type="text/paperscript" canvas="canvas-44">
5930
7220
  // Create a rectangle shaped path with its top left corner
5931
7221
  // at {x: 80, y: 25} and a size of {width: 75, height: 50}:
5932
7222
  var path = new Path.Rectangle({
@@ -5947,7 +7237,7 @@ var circlePath = new Path.Circle({
5947
7237
  // the rectangular path:
5948
7238
  circlePath.fitBounds(path.bounds, 'cover');
5949
7239
  </script>
5950
- <div class="canvas"><canvas width="516" height="100" id="canvas-46"></canvas></div>
7240
+ <div class="canvas"><canvas width="516" height="100" id="canvas-44"></canvas></div>
5951
7241
  </div>
5952
7242
 
5953
7243
 
@@ -5959,7 +7249,7 @@ circlePath.fitBounds(path.bounds, 'cover');
5959
7249
  <div class="button run">Run</div>
5960
7250
  </div>
5961
7251
 
5962
- <script type="text/paperscript" canvas="canvas-47">
7252
+ <script type="text/paperscript" canvas="canvas-45">
5963
7253
  var path = new Path.Circle({
5964
7254
  center: [80, 50],
5965
7255
  radius: 30,
@@ -5969,7 +7259,7 @@ var path = new Path.Circle({
5969
7259
  // Fit the path to the bounding rectangle of the view:
5970
7260
  path.fitBounds(view.bounds);
5971
7261
  </script>
5972
- <div class="canvas"><canvas width="516" height="200" id="canvas-47"></canvas></div>
7262
+ <div class="canvas"><canvas width="516" height="200" id="canvas-45"></canvas></div>
5973
7263
  </div>
5974
7264
 
5975
7265
 
@@ -6030,7 +7320,7 @@ path.fitBounds(view.bounds);
6030
7320
  <div class="button run">Run</div>
6031
7321
  </div>
6032
7322
 
6033
- <script type="text/paperscript" canvas="canvas-48">
7323
+ <script type="text/paperscript" canvas="canvas-46">
6034
7324
  // Create a circle shaped path at the center of the view:
6035
7325
  var path = new Path.Circle({
6036
7326
  center: view.center,
@@ -6048,7 +7338,7 @@ path.on('mouseleave', function() {
6048
7338
  this.fillColor = 'black';
6049
7339
  });
6050
7340
  </script>
6051
- <div class="canvas"><canvas width="516" height="100" id="canvas-48"></canvas></div>
7341
+ <div class="canvas"><canvas width="516" height="100" id="canvas-46"></canvas></div>
6052
7342
  </div>
6053
7343
 
6054
7344
 
@@ -6100,7 +7390,7 @@ path.on('mouseleave', function() {
6100
7390
  <div class="button run">Run</div>
6101
7391
  </div>
6102
7392
 
6103
- <script type="text/paperscript" canvas="canvas-49">
7393
+ <script type="text/paperscript" canvas="canvas-47">
6104
7394
  // Create a circle shaped path at the center of the view:
6105
7395
  var path = new Path.Circle({
6106
7396
  center: view.center,
@@ -6118,7 +7408,7 @@ path.on({
6118
7408
  }
6119
7409
  });
6120
7410
  </script>
6121
- <div class="canvas"><canvas width="516" height="100" id="canvas-49"></canvas></div>
7411
+ <div class="canvas"><canvas width="516" height="100" id="canvas-47"></canvas></div>
6122
7412
  </div>
6123
7413
 
6124
7414
 
@@ -6130,7 +7420,7 @@ path.on({
6130
7420
  <div class="button run">Run</div>
6131
7421
  </div>
6132
7422
 
6133
- <script type="text/paperscript" canvas="canvas-50">
7423
+ <script type="text/paperscript" canvas="canvas-48">
6134
7424
  var pathHandlers = {
6135
7425
  mouseenter: function(event) {
6136
7426
  this.fillColor = 'red';
@@ -6153,7 +7443,7 @@ function onMouseDown(event) {
6153
7443
  path.on(pathHandlers);
6154
7444
  }
6155
7445
  </script>
6156
- <div class="canvas"><canvas width="516" height="100" id="canvas-50"></canvas></div>
7446
+ <div class="canvas"><canvas width="516" height="100" id="canvas-48"></canvas></div>
6157
7447
  </div>
6158
7448
 
6159
7449
 
@@ -6351,10 +7641,10 @@ function onMouseDown(event) {
6351
7641
  <p>Removes the item when the events specified in the passed options object occur.</p>
6352
7642
  <ul class="member-list">
6353
7643
  <h4>Options:</h4>
6354
- <li><tt>options.move: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmousemove"><tt>tool.onMouseMove</tt></a> event is fired.</li>
6355
- <li><tt>options.drag: undefined</tt> &mdash; {Boolena) remove the item when the next <a href="../classes/Tool.html#onmousedrag"><tt>tool.onMouseDrag</tt></a> event is fired.</li>
6356
- <li><tt>options.down: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmousedown"><tt>tool.onMouseDown</tt></a> event is fired.</li>
6357
- <li><tt>options.up: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmouseup"><tt>tool.onMouseUp</tt></a> event is fired.</li>
7644
+ <li><tt>options.move: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousemove"><tt>tool.onMouseMove</tt></a> event is fired.</li>
7645
+ <li><tt>options.drag: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousedrag"><tt>tool.onMouseDrag</tt></a> event is fired.</li>
7646
+ <li><tt>options.down: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousedown"><tt>tool.onMouseDown</tt></a> event is fired.</li>
7647
+ <li><tt>options.up: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmouseup"><tt>tool.onMouseUp</tt></a> event is fired.</li>
6358
7648
  </ul>
6359
7649
 
6360
7650
  <ul class="member-list">
@@ -6381,7 +7671,7 @@ function onMouseDown(event) {
6381
7671
  <div class="button run">Run</div>
6382
7672
  </div>
6383
7673
 
6384
- <script type="text/paperscript" canvas="canvas-51">
7674
+ <script type="text/paperscript" canvas="canvas-49">
6385
7675
  function onMouseDrag(event) {
6386
7676
  // Create a circle shaped path at the mouse position,
6387
7677
  // with a radius of 10:
@@ -6398,7 +7688,7 @@ function onMouseDrag(event) {
6398
7688
  });
6399
7689
  }
6400
7690
  </script>
6401
- <div class="canvas"><canvas width="516" height="200" id="canvas-51"></canvas></div>
7691
+ <div class="canvas"><canvas width="516" height="200" id="canvas-49"></canvas></div>
6402
7692
  </div>
6403
7693
 
6404
7694
 
@@ -6428,7 +7718,7 @@ function onMouseDrag(event) {
6428
7718
  <div class="button run">Run</div>
6429
7719
  </div>
6430
7720
 
6431
- <script type="text/paperscript" canvas="canvas-52">
7721
+ <script type="text/paperscript" canvas="canvas-50">
6432
7722
  function onMouseMove(event) {
6433
7723
  // Create a circle shaped path at the mouse position,
6434
7724
  // with a radius of 10:
@@ -6442,7 +7732,7 @@ function onMouseMove(event) {
6442
7732
  path.removeOnMove();
6443
7733
  }
6444
7734
  </script>
6445
- <div class="canvas"><canvas width="516" height="200" id="canvas-52"></canvas></div>
7735
+ <div class="canvas"><canvas width="516" height="200" id="canvas-50"></canvas></div>
6446
7736
  </div>
6447
7737
 
6448
7738
 
@@ -6472,7 +7762,7 @@ function onMouseMove(event) {
6472
7762
  <div class="button run">Run</div>
6473
7763
  </div>
6474
7764
 
6475
- <script type="text/paperscript" canvas="canvas-53">
7765
+ <script type="text/paperscript" canvas="canvas-51">
6476
7766
  function onMouseDown(event) {
6477
7767
  // Create a circle shaped path at the mouse position,
6478
7768
  // with a radius of 10:
@@ -6486,7 +7776,7 @@ function onMouseDown(event) {
6486
7776
  path.removeOnDown();
6487
7777
  }
6488
7778
  </script>
6489
- <div class="canvas"><canvas width="516" height="200" id="canvas-53"></canvas></div>
7779
+ <div class="canvas"><canvas width="516" height="200" id="canvas-51"></canvas></div>
6490
7780
  </div>
6491
7781
 
6492
7782
 
@@ -6516,7 +7806,7 @@ function onMouseDown(event) {
6516
7806
  <div class="button run">Run</div>
6517
7807
  </div>
6518
7808
 
6519
- <script type="text/paperscript" canvas="canvas-54">
7809
+ <script type="text/paperscript" canvas="canvas-52">
6520
7810
  function onMouseDrag(event) {
6521
7811
  // Create a circle shaped path at the mouse position,
6522
7812
  // with a radius of 10:
@@ -6530,7 +7820,7 @@ function onMouseDrag(event) {
6530
7820
  path.removeOnDrag();
6531
7821
  }
6532
7822
  </script>
6533
- <div class="canvas"><canvas width="516" height="200" id="canvas-54"></canvas></div>
7823
+ <div class="canvas"><canvas width="516" height="200" id="canvas-52"></canvas></div>
6534
7824
  </div>
6535
7825
 
6536
7826
 
@@ -6560,7 +7850,7 @@ function onMouseDrag(event) {
6560
7850
  <div class="button run">Run</div>
6561
7851
  </div>
6562
7852
 
6563
- <script type="text/paperscript" canvas="canvas-55">
7853
+ <script type="text/paperscript" canvas="canvas-53">
6564
7854
  function onMouseDown(event) {
6565
7855
  // Create a circle shaped path at the mouse position,
6566
7856
  // with a radius of 10:
@@ -6574,7 +7864,7 @@ function onMouseDown(event) {
6574
7864
  path.removeOnUp();
6575
7865
  }
6576
7866
  </script>
6577
- <div class="canvas"><canvas width="516" height="200" id="canvas-55"></canvas></div>
7867
+ <div class="canvas"><canvas width="516" height="200" id="canvas-53"></canvas></div>
6578
7868
  </div>
6579
7869
 
6580
7870
 
@@ -6647,7 +7937,7 @@ function onMouseDown(event) {
6647
7937
  <div class="button run">Run</div>
6648
7938
  </div>
6649
7939
 
6650
- <script type="text/paperscript" canvas="canvas-56">
7940
+ <script type="text/paperscript" canvas="canvas-54">
6651
7941
  var path = new Path.Circle({
6652
7942
  radius: view.bounds.height * 0.4,
6653
7943
  center: view.center
@@ -6658,7 +7948,7 @@ path.tween(
6658
7948
  3000
6659
7949
  );
6660
7950
  </script>
6661
- <div class="canvas"><canvas width="516" height="100" id="canvas-56"></canvas></div>
7951
+ <div class="canvas"><canvas width="516" height="100" id="canvas-54"></canvas></div>
6662
7952
  </div>
6663
7953
 
6664
7954
 
@@ -6670,7 +7960,7 @@ path.tween(
6670
7960
  <div class="button run">Run</div>
6671
7961
  </div>
6672
7962
 
6673
- <script type="text/paperscript" canvas="canvas-57">
7963
+ <script type="text/paperscript" canvas="canvas-55">
6674
7964
  var path = new Shape.Rectangle({
6675
7965
  fillColor: 'red',
6676
7966
  center: [50, view.center.y],
@@ -6685,7 +7975,7 @@ path.tween({
6685
7975
  duration: 2000
6686
7976
  });
6687
7977
  </script>
6688
- <div class="canvas"><canvas width="516" height="100" id="canvas-57"></canvas></div>
7978
+ <div class="canvas"><canvas width="516" height="100" id="canvas-55"></canvas></div>
6689
7979
  </div>
6690
7980
 
6691
7981
 
@@ -6751,7 +8041,7 @@ path.tween({
6751
8041
  <div class="button run">Run</div>
6752
8042
  </div>
6753
8043
 
6754
- <script type="text/paperscript" canvas="canvas-58">
8044
+ <script type="text/paperscript" canvas="canvas-56">
6755
8045
  var path = new Path.Rectangle({
6756
8046
  size: [100, 100],
6757
8047
  position: view.center,
@@ -6765,7 +8055,7 @@ path.tween({
6765
8055
  'segments[2].point.x': '-= 50'
6766
8056
  }, 3000);
6767
8057
  </script>
6768
- <div class="canvas"><canvas width="516" height="200" id="canvas-58"></canvas></div>
8058
+ <div class="canvas"><canvas width="516" height="200" id="canvas-56"></canvas></div>
6769
8059
  </div>
6770
8060
 
6771
8061
 
@@ -6824,7 +8114,7 @@ path.tween({
6824
8114
  <div class="button run">Run</div>
6825
8115
  </div>
6826
8116
 
6827
- <script type="text/paperscript" canvas="canvas-59">
8117
+ <script type="text/paperscript" canvas="canvas-57">
6828
8118
  var path = new Path.Circle({
6829
8119
  fillColor: 'blue',
6830
8120
  radius: view.bounds.height * 0.4,
@@ -6840,7 +8130,7 @@ path.tween(2000).onUpdate = function(event) {
6840
8130
  path.interpolate(pathFrom, pathTo, event.factor)
6841
8131
  };
6842
8132
  </script>
6843
- <div class="canvas"><canvas width="516" height="100" id="canvas-59"></canvas></div>
8133
+ <div class="canvas"><canvas width="516" height="100" id="canvas-57"></canvas></div>
6844
8134
  </div>
6845
8135
 
6846
8136
 
@@ -6961,7 +8251,7 @@ path.tween(2000).onUpdate = function(event) {
6961
8251
  <div class="button run">Run</div>
6962
8252
  </div>
6963
8253
 
6964
- <script type="text/paperscript" canvas="canvas-60">
8254
+ <script type="text/paperscript" canvas="canvas-58">
6965
8255
  var path = new Path.Circle({
6966
8256
  fillColor: 'blue',
6967
8257
  radius: view.bounds.height * 0.4,
@@ -6969,7 +8259,7 @@ var path = new Path.Circle({
6969
8259
  });
6970
8260
  path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
6971
8261
  </script>
6972
- <div class="canvas"><canvas width="516" height="100" id="canvas-60"></canvas></div>
8262
+ <div class="canvas"><canvas width="516" height="100" id="canvas-58"></canvas></div>
6973
8263
  </div>
6974
8264
 
6975
8265
 
@@ -6983,7 +8273,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
6983
8273
 
6984
8274
  <!-- =========================== copyright notice ========================== -->
6985
8275
  <p class="footer">
6986
- Paper.js v0.14.0<br>
8276
+ Paper.js v0.15.0<br>
6987
8277
  Copyright &#169; 2011—2026 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
6988
8278
  <div class="content-end"></div>
6989
8279