paper 0.16.0 → 0.17.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.
- package/CHANGELOG.md +95 -0
- package/dist/docs/assets/js/paper.js +4565 -733
- package/dist/docs/classes/AreaText.html +720 -242
- package/dist/docs/classes/ChangeFlag.html +1 -1
- package/dist/docs/classes/Color.html +218 -21
- package/dist/docs/classes/CompoundPath.html +1146 -296
- package/dist/docs/classes/Curve.html +1 -1
- package/dist/docs/classes/CurveLocation.html +1 -1
- package/dist/docs/classes/DrawEvent.html +69 -0
- package/dist/docs/classes/Effect.html +434 -0
- package/dist/docs/classes/EffectInstance.html +304 -0
- package/dist/docs/classes/Event.html +1 -1
- package/dist/docs/classes/Gradient.html +1 -1
- package/dist/docs/classes/GradientStop.html +1 -1
- package/dist/docs/classes/Group.html +792 -243
- package/dist/docs/classes/HitResult.html +1 -1
- package/dist/docs/classes/HostItem.html +720 -242
- package/dist/docs/classes/Item.html +777 -242
- package/dist/docs/classes/Key.html +1 -1
- package/dist/docs/classes/KeyEvent.html +1 -1
- package/dist/docs/classes/Layer.html +734 -185
- package/dist/docs/classes/Matrix.html +1 -1
- package/dist/docs/classes/MouseEvent.html +1 -1
- package/dist/docs/classes/PaperScope.html +1 -1
- package/dist/docs/classes/PaperScript.html +4 -2
- package/dist/docs/classes/Path.html +1195 -252
- package/dist/docs/classes/PathItem.html +1148 -298
- package/dist/docs/classes/PathText.html +720 -242
- package/dist/docs/classes/PatternDefinition.html +367 -0
- package/dist/docs/classes/Point.html +1 -1
- package/dist/docs/classes/PointText.html +720 -242
- package/dist/docs/classes/Project.html +177 -7
- package/dist/docs/classes/Raster.html +720 -242
- package/dist/docs/classes/Rectangle.html +1 -1
- package/dist/docs/classes/Segment.html +3 -3
- package/dist/docs/classes/Shape.html +720 -242
- package/dist/docs/classes/Size.html +1 -1
- package/dist/docs/classes/StrokeProfileStop.html +346 -0
- package/dist/docs/classes/Style.html +1 -1
- package/dist/docs/classes/SymbolDefinition.html +28 -2
- package/dist/docs/classes/SymbolItem.html +720 -242
- package/dist/docs/classes/TextItem.html +720 -242
- package/dist/docs/classes/TextRange.html +1 -1
- package/dist/docs/classes/TextStory.html +1 -1
- package/dist/docs/classes/Tool.html +2 -2
- package/dist/docs/classes/ToolEvent.html +1 -1
- package/dist/docs/classes/Tween.html +1 -1
- package/dist/docs/classes/View.html +2 -2
- package/dist/docs/classes/global.html +1 -1
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/node/browser.js +15 -0
- package/dist/paper-core.js +4476 -674
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +4565 -733
- package/dist/paper-full.min.js +3 -3
- package/dist/paper-hosted.js +5111 -823
- package/dist/paper.d.ts +898 -47
- package/examples/Paperjs.org/LiveEffects.html +366 -0
- package/examples/Paperjs.org/Offsetting.html +379 -0
- package/examples/Paperjs.org/StrokeProfiles.html +706 -0
- package/examples/Scripts/Patterns.html +57 -0
- package/package.json +5 -3
|
@@ -1906,7 +1906,7 @@ var size = maxSize * randomSize;</code></pre>
|
|
|
1906
1906
|
|
|
1907
1907
|
<!-- =========================== copyright notice ========================== -->
|
|
1908
1908
|
<p class="footer">
|
|
1909
|
-
Paper.js v0.
|
|
1909
|
+
Paper.js v0.17.0<br>
|
|
1910
1910
|
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1911
1911
|
<div class="content-end"></div>
|
|
1912
1912
|
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>StrokeProfileStop</title>
|
|
6
|
+
<base target="class-frame">
|
|
7
|
+
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
|
8
|
+
<script src="../assets/js/paper.js"></script>
|
|
9
|
+
<script src="../assets/js/jquery.js"></script>
|
|
10
|
+
<script src="../assets/js/codemirror.js"></script>
|
|
11
|
+
<script src="../assets/js/docs.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<article class="reference">
|
|
15
|
+
<div class="reference-class">
|
|
16
|
+
<h1>StrokeProfileStop</h1>
|
|
17
|
+
|
|
18
|
+
<p>A stop of the stroke profile of a path, see <a href="../classes/Path.html#strokeprofile"><tt>path.strokeProfile</tt></a>: the pen that draws its stroke at an offset along the path, an ellipse with a width, an aspect and an angle. Between the stops, each of them changes along the path, easing into and out of smooth stops and in straight lines from the others, see <a href="../classes/StrokeProfileStop.html#smooth"><tt>smooth</tt></a>. A stop can set only some of them, and leave the others to the stops around it.</p>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<!-- =============================== constructors ========================== -->
|
|
24
|
+
<div class="reference-members">
|
|
25
|
+
<h2>Constructors</h2>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<div id="strokeprofilestop" class="member">
|
|
29
|
+
<div class="member-link">
|
|
30
|
+
<a name="strokeprofilestop" href="#strokeprofilestop"><tt><b>StrokeProfileStop</b>([object])</tt></a>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="member-description hidden">
|
|
33
|
+
<div class="member-text">
|
|
34
|
+
<p>Creates a stroke profile stop.</p>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<ul class="member-list">
|
|
38
|
+
<h4>Parameters:</h4>
|
|
39
|
+
|
|
40
|
+
<li>
|
|
41
|
+
<tt>object:</tt>
|
|
42
|
+
<tt>Object</tt>
|
|
43
|
+
— the properties of the stop, its <code>offset</code>, <code>width</code>, <code>aspect</code>, <code>angle</code> and <code>smooth</code>
|
|
44
|
+
— optional
|
|
45
|
+
</li>
|
|
46
|
+
|
|
47
|
+
</ul>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<ul class="member-list">
|
|
51
|
+
<h4>Returns:</h4>
|
|
52
|
+
|
|
53
|
+
<li>
|
|
54
|
+
<tt><a href="../classes/StrokeProfileStop.html"><tt>StrokeProfileStop</tt></a></tt>
|
|
55
|
+
</li>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
</ul>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<h4>Example:</h4>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<pre><code>var path = new Path.Line([20, 50], [180, 50]);
|
|
67
|
+
path.strokeColor = 'black';
|
|
68
|
+
path.strokeWidth = 10;
|
|
69
|
+
path.strokeProfile = [
|
|
70
|
+
new StrokeProfileStop({ offset: 0, width: 0.5 }),
|
|
71
|
+
new StrokeProfileStop({ offset: 160, width: 2 })
|
|
72
|
+
];</code></pre>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<!-- ================================ properties =========================== -->
|
|
85
|
+
<div class="reference-members">
|
|
86
|
+
<h2>Properties</h2>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<div id="path" class="member">
|
|
90
|
+
<div class="member-link">
|
|
91
|
+
<a name="path" href="#path"><tt><b>path</b></tt></a>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="member-description hidden">
|
|
94
|
+
|
|
95
|
+
<div class="member-text">
|
|
96
|
+
<p>The path whose stroke profile the stop is part of.</p>
|
|
97
|
+
|
|
98
|
+
<p>Read only.</p>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<ul class="member-list">
|
|
103
|
+
<h4>Type:</h4>
|
|
104
|
+
<li>
|
|
105
|
+
<a href="../classes/Path.html"><tt>Path</tt></a>⟋<tt>null</tt>
|
|
106
|
+
</li>
|
|
107
|
+
</ul>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<div id="offset" class="member">
|
|
118
|
+
<div class="member-link">
|
|
119
|
+
<a name="offset" href="#offset"><tt><b>offset</b></tt></a>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="member-description hidden">
|
|
122
|
+
|
|
123
|
+
<div class="member-text">
|
|
124
|
+
<p>The offset of the stop along its path, as in <a href="../classes/Path.html#getpointat-offset"><tt>path.getPointAt(offset)</tt></a>. Unlike the offset of gradient stops, it is a length, not a fraction. The stop stays between the same segments when they move, so its offset changes with the lengths of the curves before it.</p>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<ul class="member-list">
|
|
129
|
+
<h4>Type:</h4>
|
|
130
|
+
<li>
|
|
131
|
+
<tt>Number</tt>
|
|
132
|
+
</li>
|
|
133
|
+
</ul>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
<div id="width" class="member">
|
|
144
|
+
<div class="member-link">
|
|
145
|
+
<a name="width" href="#width"><tt><b>width</b></tt></a>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="member-description hidden">
|
|
148
|
+
|
|
149
|
+
<div class="member-text">
|
|
150
|
+
<p>The width of the pen at the stop, as a factor of the path’s <a href="../classes/Style.html#strokewidth"><tt>style.strokeWidth</tt></a>: <code>1</code> for the stroke width, <code>2</code> for twice as wide. Stops without a width leave it to the stops around them, and without any, it is <code>1</code>.</p>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<ul class="member-list">
|
|
155
|
+
<h4>Type:</h4>
|
|
156
|
+
<li>
|
|
157
|
+
<tt>Number</tt>⟋<tt>null</tt>
|
|
158
|
+
</li>
|
|
159
|
+
</ul>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div id="aspect" class="member">
|
|
170
|
+
<div class="member-link">
|
|
171
|
+
<a name="aspect" href="#aspect"><tt><b>aspect</b></tt></a>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="member-description hidden">
|
|
174
|
+
|
|
175
|
+
<div class="member-text">
|
|
176
|
+
<p>The aspect of the pen at the stop: its height as a factor of its width, <code>1</code> for a round pen, less for a flat nib. Stops without an aspect leave it to the stops around them, and without any, it is <code>1</code>.</p>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
<ul class="member-list">
|
|
181
|
+
<h4>Type:</h4>
|
|
182
|
+
<li>
|
|
183
|
+
<tt>Number</tt>⟋<tt>null</tt>
|
|
184
|
+
</li>
|
|
185
|
+
</ul>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<div id="angle" class="member">
|
|
196
|
+
<div class="member-link">
|
|
197
|
+
<a name="angle" href="#angle"><tt><b>angle</b></tt></a>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="member-description hidden">
|
|
200
|
+
|
|
201
|
+
<div class="member-text">
|
|
202
|
+
<p>The angle of the pen at the stop, in degrees, in the path’s coordinates. Angles aren’t wrapped: from <code>0</code> at one stop to <code>720</code> at the next, the pen turns twice. Stops without an angle leave it to the stops around them, and without any, it is <code>0</code>.</p>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<ul class="member-list">
|
|
207
|
+
<h4>Type:</h4>
|
|
208
|
+
<li>
|
|
209
|
+
<tt>Number</tt>⟋<tt>null</tt>
|
|
210
|
+
</li>
|
|
211
|
+
</ul>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<div id="smooth" class="member">
|
|
222
|
+
<div class="member-link">
|
|
223
|
+
<a name="smooth" href="#smooth"><tt><b>smooth</b></tt></a>
|
|
224
|
+
</div>
|
|
225
|
+
<div class="member-description hidden">
|
|
226
|
+
|
|
227
|
+
<div class="member-text">
|
|
228
|
+
<p>Whether the values ease into and out of the stop: they arrive at it and leave it flat, and between two smooth stops, a value follows a cubic from one to the other, without overshooting them. As the slopes don’t depend on other stops, changing a stop only changes the values up to the stops on either side of it. Without smoothing, the values change in straight lines to the stops on either side.</p>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
<ul class="member-list">
|
|
233
|
+
<h4>Default:</h4>
|
|
234
|
+
<li><tt>true</tt></li>
|
|
235
|
+
</ul>
|
|
236
|
+
|
|
237
|
+
<ul class="member-list">
|
|
238
|
+
<h4>Type:</h4>
|
|
239
|
+
<li>
|
|
240
|
+
<tt>Boolean</tt>
|
|
241
|
+
</li>
|
|
242
|
+
</ul>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<!-- ============================== methods ================================ -->
|
|
258
|
+
<div class="reference-members">
|
|
259
|
+
<h2>Methods</h2>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<div id="clone" class="member">
|
|
263
|
+
<div class="member-link">
|
|
264
|
+
<a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="member-description hidden">
|
|
267
|
+
<div class="member-text">
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
<ul class="member-list">
|
|
273
|
+
<h4>Returns:</h4>
|
|
274
|
+
|
|
275
|
+
<li>
|
|
276
|
+
<tt><a href="../classes/StrokeProfileStop.html"><tt>StrokeProfileStop</tt></a></tt> — a copy of the stop, without a path
|
|
277
|
+
</li>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
</ul>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
<div id="equals-stop" class="member">
|
|
292
|
+
<div class="member-link">
|
|
293
|
+
<a name="equals-stop" href="#equals-stop"><tt><b>equals</b>(stop)</tt></a>
|
|
294
|
+
</div>
|
|
295
|
+
<div class="member-description hidden">
|
|
296
|
+
<div class="member-text">
|
|
297
|
+
<p>Checks whether the stop is equal to the supplied one.</p>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
<ul class="member-list">
|
|
301
|
+
<h4>Parameters:</h4>
|
|
302
|
+
|
|
303
|
+
<li>
|
|
304
|
+
<tt>stop:</tt>
|
|
305
|
+
<a href="../classes/StrokeProfileStop.html"><tt>StrokeProfileStop</tt></a>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
</li>
|
|
309
|
+
|
|
310
|
+
</ul>
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<ul class="member-list">
|
|
314
|
+
<h4>Returns:</h4>
|
|
315
|
+
|
|
316
|
+
<li>
|
|
317
|
+
<tt><tt>Boolean</tt></tt> — <tt>true</tt> if they are equal, <tt>false</tt> otherwise
|
|
318
|
+
</li>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
</ul>
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
<!-- =========================== copyright notice ========================== -->
|
|
339
|
+
<p class="footer">
|
|
340
|
+
Paper.js v0.17.0<br>
|
|
341
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
342
|
+
<div class="content-end"></div>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
</article>
|
|
346
|
+
</body>
|
|
@@ -1756,7 +1756,7 @@ wordsLongerThan, afterFirst, beforeLast, limit, zone, capitalized }</code>. Kept
|
|
|
1756
1756
|
|
|
1757
1757
|
<!-- =========================== copyright notice ========================== -->
|
|
1758
1758
|
<p class="footer">
|
|
1759
|
-
Paper.js v0.
|
|
1759
|
+
Paper.js v0.17.0<br>
|
|
1760
1760
|
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1761
1761
|
<div class="content-end"></div>
|
|
1762
1762
|
|
|
@@ -142,6 +142,32 @@ for (var i = 0; i < 100; i++) {
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<div id="name" class="member">
|
|
152
|
+
<div class="member-link">
|
|
153
|
+
<a name="name" href="#name"><tt><b>name</b></tt></a>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="member-description hidden">
|
|
156
|
+
|
|
157
|
+
<div class="member-text">
|
|
158
|
+
<p>The name of the symbol.</p>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<ul class="member-list">
|
|
163
|
+
<h4>Type:</h4>
|
|
164
|
+
<li>
|
|
165
|
+
<tt>String</tt>
|
|
166
|
+
</li>
|
|
167
|
+
</ul>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
145
171
|
</div>
|
|
146
172
|
|
|
147
173
|
</div>
|
|
@@ -231,7 +257,7 @@ for (var i = 0; i < 100; i++) {
|
|
|
231
257
|
</div>
|
|
232
258
|
<div class="member-description hidden">
|
|
233
259
|
<div class="member-text">
|
|
234
|
-
<p>Returns a copy of the symbol.</p>
|
|
260
|
+
<p>Returns a copy of the symbol, with a copy of its item and its name.</p>
|
|
235
261
|
|
|
236
262
|
|
|
237
263
|
|
|
@@ -303,7 +329,7 @@ for (var i = 0; i < 100; i++) {
|
|
|
303
329
|
|
|
304
330
|
<!-- =========================== copyright notice ========================== -->
|
|
305
331
|
<p class="footer">
|
|
306
|
-
Paper.js v0.
|
|
332
|
+
Paper.js v0.17.0<br>
|
|
307
333
|
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
308
334
|
<div class="content-end"></div>
|
|
309
335
|
|