paper 0.12.18 → 0.12.19

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 (228) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/docs/assets/js/paper.js +91 -53
  3. package/dist/docs/classes/Color.html +2 -2
  4. package/dist/docs/classes/CompoundPath.html +2 -2
  5. package/dist/docs/classes/Curve.html +2 -2
  6. package/dist/docs/classes/CurveLocation.html +2 -2
  7. package/dist/docs/classes/Event.html +2 -2
  8. package/dist/docs/classes/Gradient.html +2 -2
  9. package/dist/docs/classes/GradientStop.html +2 -2
  10. package/dist/docs/classes/Group.html +2 -2
  11. package/dist/docs/classes/HitResult.html +2 -2
  12. package/dist/docs/classes/Item.html +2 -2
  13. package/dist/docs/classes/Key.html +2 -2
  14. package/dist/docs/classes/KeyEvent.html +2 -2
  15. package/dist/docs/classes/Layer.html +2 -2
  16. package/dist/docs/classes/Matrix.html +2 -2
  17. package/dist/docs/classes/MouseEvent.html +2 -2
  18. package/dist/docs/classes/PaperScope.html +2 -2
  19. package/dist/docs/classes/PaperScript.html +2 -2
  20. package/dist/docs/classes/Path.html +2 -2
  21. package/dist/docs/classes/PathItem.html +2 -2
  22. package/dist/docs/classes/Point.html +2 -2
  23. package/dist/docs/classes/PointText.html +2 -2
  24. package/dist/docs/classes/Project.html +2 -2
  25. package/dist/docs/classes/Raster.html +2 -2
  26. package/dist/docs/classes/Rectangle.html +2 -2
  27. package/dist/docs/classes/Segment.html +2 -2
  28. package/dist/docs/classes/Shape.html +2 -2
  29. package/dist/docs/classes/Size.html +2 -2
  30. package/dist/docs/classes/Style.html +2 -2
  31. package/dist/docs/classes/SymbolDefinition.html +2 -2
  32. package/dist/docs/classes/SymbolItem.html +2 -2
  33. package/dist/docs/classes/TextItem.html +2 -2
  34. package/dist/docs/classes/Tool.html +2 -2
  35. package/dist/docs/classes/ToolEvent.html +2 -2
  36. package/dist/docs/classes/Tween.html +2 -2
  37. package/dist/docs/classes/View.html +2 -2
  38. package/dist/docs/classes/global.html +2 -2
  39. package/dist/docs/classes/index.html +2 -2
  40. package/dist/docs/index.html +1 -1
  41. package/dist/paper-core.js +90 -52
  42. package/dist/paper-core.min.js +3 -3
  43. package/dist/paper-full.js +91 -53
  44. package/dist/paper-full.min.js +3 -3
  45. package/dist/paper.d.ts +2 -2
  46. package/package.json +5 -2
  47. package/dist/paperjs/LICENSE.txt +0 -23
  48. package/dist/paperjs/dist/node/canvas.js +0 -66
  49. package/dist/paperjs/dist/node/extend.js +0 -156
  50. package/dist/paperjs/dist/node/self.js +0 -58
  51. package/dist/paperjs/dist/node/xml.js +0 -40
  52. package/dist/paperjs/dist/paper-core.d.ts +0 -1
  53. package/dist/paperjs/dist/paper-core.js +0 -15703
  54. package/dist/paperjs/dist/paper-core.min.js +0 -32
  55. package/dist/paperjs/dist/paper-full.js +0 -17472
  56. package/dist/paperjs/dist/paper-full.min.js +0 -32
  57. package/dist/paperjs/dist/paper.d.ts +0 -7394
  58. package/dist/paperjs/docs/assets/css/docs.css +0 -414
  59. package/dist/paperjs/docs/assets/js/codemirror.js +0 -4
  60. package/dist/paperjs/docs/assets/js/docs.js +0 -493
  61. package/dist/paperjs/docs/assets/js/jquery.js +0 -6
  62. package/dist/paperjs/docs/assets/js/paper.js +0 -17472
  63. package/dist/paperjs/docs/classes/Color.html +0 -2188
  64. package/dist/paperjs/docs/classes/CompoundPath.html +0 -8877
  65. package/dist/paperjs/docs/classes/Curve.html +0 -2323
  66. package/dist/paperjs/docs/classes/CurveLocation.html +0 -672
  67. package/dist/paperjs/docs/classes/Event.html +0 -176
  68. package/dist/paperjs/docs/classes/Gradient.html +0 -240
  69. package/dist/paperjs/docs/classes/GradientStop.html +0 -273
  70. package/dist/paperjs/docs/classes/Group.html +0 -6864
  71. package/dist/paperjs/docs/classes/HitResult.html +0 -239
  72. package/dist/paperjs/docs/classes/Item.html +0 -6628
  73. package/dist/paperjs/docs/classes/Key.html +0 -139
  74. package/dist/paperjs/docs/classes/KeyEvent.html +0 -308
  75. package/dist/paperjs/docs/classes/Layer.html +0 -6850
  76. package/dist/paperjs/docs/classes/Matrix.html +0 -1744
  77. package/dist/paperjs/docs/classes/MouseEvent.html +0 -355
  78. package/dist/paperjs/docs/classes/PaperScope.html +0 -459
  79. package/dist/paperjs/docs/classes/PaperScript.html +0 -198
  80. package/dist/paperjs/docs/classes/Path.html +0 -11775
  81. package/dist/paperjs/docs/classes/PathItem.html +0 -8639
  82. package/dist/paperjs/docs/classes/Point.html +0 -2699
  83. package/dist/paperjs/docs/classes/PointText.html +0 -7029
  84. package/dist/paperjs/docs/classes/Project.html +0 -1305
  85. package/dist/paperjs/docs/classes/Raster.html +0 -7843
  86. package/dist/paperjs/docs/classes/Rectangle.html +0 -1654
  87. package/dist/paperjs/docs/classes/Segment.html +0 -939
  88. package/dist/paperjs/docs/classes/Shape.html +0 -7363
  89. package/dist/paperjs/docs/classes/Size.html +0 -1825
  90. package/dist/paperjs/docs/classes/Style.html +0 -919
  91. package/dist/paperjs/docs/classes/SymbolDefinition.html +0 -311
  92. package/dist/paperjs/docs/classes/SymbolItem.html +0 -6755
  93. package/dist/paperjs/docs/classes/TextItem.html +0 -6869
  94. package/dist/paperjs/docs/classes/Tool.html +0 -761
  95. package/dist/paperjs/docs/classes/ToolEvent.html +0 -446
  96. package/dist/paperjs/docs/classes/Tween.html +0 -374
  97. package/dist/paperjs/docs/classes/View.html +0 -1772
  98. package/dist/paperjs/docs/classes/global.html +0 -425
  99. package/dist/paperjs/docs/classes/index.html +0 -88
  100. package/dist/paperjs/docs/index.html +0 -11
  101. package/dist/paperjs/examples/Animated/AnimatedStar.html +0 -53
  102. package/dist/paperjs/examples/Animated/BooleanOperations.html +0 -115
  103. package/dist/paperjs/examples/Animated/CandyCrash.html +0 -151
  104. package/dist/paperjs/examples/Animated/Extruded.html +0 -50
  105. package/dist/paperjs/examples/Animated/Lines.html +0 -53
  106. package/dist/paperjs/examples/Animated/Smoothing.html +0 -70
  107. package/dist/paperjs/examples/Animated/Space.html +0 -86
  108. package/dist/paperjs/examples/Animated/SpaceUsingShapes.html +0 -79
  109. package/dist/paperjs/examples/Games/Paperoids.html +0 -569
  110. package/dist/paperjs/examples/JSON/Circle Testing.html +0 -34
  111. package/dist/paperjs/examples/JSON/Compound Path.html +0 -25
  112. package/dist/paperjs/examples/JSON/Empty Path Testing.html +0 -31
  113. package/dist/paperjs/examples/JSON/Gradients.html +0 -34
  114. package/dist/paperjs/examples/JSON/Group Transform.html +0 -28
  115. package/dist/paperjs/examples/JSON/Line Testing.html +0 -44
  116. package/dist/paperjs/examples/JSON/Random Path Testing.html +0 -42
  117. package/dist/paperjs/examples/JSON/Raster.html +0 -29
  118. package/dist/paperjs/examples/JSON/Rect and Attribute Testing.html +0 -56
  119. package/dist/paperjs/examples/JSON/Rotated Primitives.html +0 -55
  120. package/dist/paperjs/examples/JSON/Selection.html +0 -43
  121. package/dist/paperjs/examples/JSON/Shapes.html +0 -54
  122. package/dist/paperjs/examples/JSON/Symbols.html +0 -30
  123. package/dist/paperjs/examples/JSON/Text Testing.html +0 -38
  124. package/dist/paperjs/examples/JSON/Tiger.html +0 -19
  125. package/dist/paperjs/examples/JSON/Transform Test 1.html +0 -32
  126. package/dist/paperjs/examples/JSON/Transform Test 2.html +0 -30
  127. package/dist/paperjs/examples/Node.js/AnimatedStar.js +0 -52
  128. package/dist/paperjs/examples/Node.js/BooleanOperations.js +0 -36
  129. package/dist/paperjs/examples/Node.js/JSONtoPDF.js +0 -20
  130. package/dist/paperjs/examples/Node.js/Raster.js +0 -32
  131. package/dist/paperjs/examples/Node.js/RasterRemote.js +0 -33
  132. package/dist/paperjs/examples/Node.js/SvgExport.js +0 -52
  133. package/dist/paperjs/examples/Node.js/SvgImport.js +0 -23
  134. package/dist/paperjs/examples/Node.js/Tadpoles.js +0 -16
  135. package/dist/paperjs/examples/Node.js/Tadpoles.pjs +0 -278
  136. package/dist/paperjs/examples/Node.js/in.json +0 -1
  137. package/dist/paperjs/examples/Node.js/in.svg +0 -16
  138. package/dist/paperjs/examples/Paperjs.org/BooleanOperattions.html +0 -115
  139. package/dist/paperjs/examples/Paperjs.org/BouncingBalls.html +0 -103
  140. package/dist/paperjs/examples/Paperjs.org/Chain.html +0 -54
  141. package/dist/paperjs/examples/Paperjs.org/DivisionRaster.html +0 -72
  142. package/dist/paperjs/examples/Paperjs.org/FutureSplash.html +0 -122
  143. package/dist/paperjs/examples/Paperjs.org/HitTesting.html +0 -103
  144. package/dist/paperjs/examples/Paperjs.org/InteractiveTiger.html +0 -777
  145. package/dist/paperjs/examples/Paperjs.org/MetaBalls.html +0 -132
  146. package/dist/paperjs/examples/Paperjs.org/NyanRainbow.html +0 -202
  147. package/dist/paperjs/examples/Paperjs.org/PathIntersections.html +0 -76
  148. package/dist/paperjs/examples/Paperjs.org/Qbertify.html +0 -146
  149. package/dist/paperjs/examples/Paperjs.org/RadialRainbows.html +0 -80
  150. package/dist/paperjs/examples/Paperjs.org/RoundedRectangles.html +0 -41
  151. package/dist/paperjs/examples/Paperjs.org/SatieLikedToDraw.html +0 -140
  152. package/dist/paperjs/examples/Paperjs.org/Simplify.html +0 -63
  153. package/dist/paperjs/examples/Paperjs.org/SpiralRaster.html +0 -120
  154. package/dist/paperjs/examples/Paperjs.org/Tadpoles.html +0 -283
  155. package/dist/paperjs/examples/Paperjs.org/Voronoi.html +0 -134
  156. package/dist/paperjs/examples/Rasters/PhyllotaxisRaster.html +0 -96
  157. package/dist/paperjs/examples/Rasters/Raster.html +0 -34
  158. package/dist/paperjs/examples/Rasters/RotationRaster.html +0 -44
  159. package/dist/paperjs/examples/Rasters/Smoothing.html +0 -36
  160. package/dist/paperjs/examples/SVG Export/Circle Testing.html +0 -32
  161. package/dist/paperjs/examples/SVG Export/Clipping.html +0 -17
  162. package/dist/paperjs/examples/SVG Export/Compound Path.html +0 -22
  163. package/dist/paperjs/examples/SVG Export/Empty Path Testing.html +0 -28
  164. package/dist/paperjs/examples/SVG Export/Gradients.html +0 -52
  165. package/dist/paperjs/examples/SVG Export/Group Transform.html +0 -25
  166. package/dist/paperjs/examples/SVG Export/Line Testing.html +0 -41
  167. package/dist/paperjs/examples/SVG Export/Random Path Testing.html +0 -39
  168. package/dist/paperjs/examples/SVG Export/Raster.html +0 -21
  169. package/dist/paperjs/examples/SVG Export/Rect and Attribute Testing.html +0 -53
  170. package/dist/paperjs/examples/SVG Export/Rotated Primitives.html +0 -80
  171. package/dist/paperjs/examples/SVG Export/Shapes.html +0 -58
  172. package/dist/paperjs/examples/SVG Export/Symbols.html +0 -27
  173. package/dist/paperjs/examples/SVG Export/Text Testing.html +0 -45
  174. package/dist/paperjs/examples/SVG Export/Tiger.html +0 -23
  175. package/dist/paperjs/examples/SVG Export/Transform Test 1.html +0 -29
  176. package/dist/paperjs/examples/SVG Export/Transform Test 2.html +0 -27
  177. package/dist/paperjs/examples/SVG Import/Arcs.html +0 -78
  178. package/dist/paperjs/examples/SVG Import/Butterfly.html +0 -223
  179. package/dist/paperjs/examples/SVG Import/Circle and Ellipse Testing.html +0 -26
  180. package/dist/paperjs/examples/SVG Import/Clipping.html +0 -100
  181. package/dist/paperjs/examples/SVG Import/From File.html +0 -30
  182. package/dist/paperjs/examples/SVG Import/Gradient.html +0 -138
  183. package/dist/paperjs/examples/SVG Import/Gradients.html +0 -30
  184. package/dist/paperjs/examples/SVG Import/Inkscape Pivot.html +0 -52
  185. package/dist/paperjs/examples/SVG Import/Inkscape.html +0 -88
  186. package/dist/paperjs/examples/SVG Import/Line Testing.html +0 -24
  187. package/dist/paperjs/examples/SVG Import/MoreGradients.html +0 -107
  188. package/dist/paperjs/examples/SVG Import/Multiple Paths Test 1.html +0 -42
  189. package/dist/paperjs/examples/SVG Import/Multiple Paths Test 2.html +0 -33
  190. package/dist/paperjs/examples/SVG Import/Nested Groups Test.html +0 -78
  191. package/dist/paperjs/examples/SVG Import/Polybezier.html +0 -43
  192. package/dist/paperjs/examples/SVG Import/Rect Testing.html +0 -25
  193. package/dist/paperjs/examples/SVG Import/Symbols.html +0 -24
  194. package/dist/paperjs/examples/SVG Import/Testing.html +0 -40
  195. package/dist/paperjs/examples/SVG Import/Text Testing.html +0 -19
  196. package/dist/paperjs/examples/SVG Import/Tiger.html +0 -742
  197. package/dist/paperjs/examples/SVG Import/Transform Testing.html +0 -22
  198. package/dist/paperjs/examples/SVG Import/Viewbox.html +0 -38
  199. package/dist/paperjs/examples/Scripts/Arcs.html +0 -39
  200. package/dist/paperjs/examples/Scripts/BlendModes.html +0 -77
  201. package/dist/paperjs/examples/Scripts/BooleanOperations.html +0 -937
  202. package/dist/paperjs/examples/Scripts/CompoundPath.html +0 -19
  203. package/dist/paperjs/examples/Scripts/CurveTimeParameterization.html +0 -61
  204. package/dist/paperjs/examples/Scripts/HslColor.html +0 -53
  205. package/dist/paperjs/examples/Scripts/PathStructure.html +0 -82
  206. package/dist/paperjs/examples/Scripts/PathTangents.html +0 -73
  207. package/dist/paperjs/examples/Scripts/Resize.html +0 -42
  208. package/dist/paperjs/examples/Scripts/RoundRectangle.html +0 -28
  209. package/dist/paperjs/examples/Scripts/Shapes.html +0 -54
  210. package/dist/paperjs/examples/Scripts/StrokeBounds.html +0 -101
  211. package/dist/paperjs/examples/Scripts/StrokeScaling.html +0 -65
  212. package/dist/paperjs/examples/Tools/BezierTool.html +0 -90
  213. package/dist/paperjs/examples/Tools/Circles.html +0 -28
  214. package/dist/paperjs/examples/Tools/Clouds.html +0 -35
  215. package/dist/paperjs/examples/Tools/DrippingBrush.html +0 -73
  216. package/dist/paperjs/examples/Tools/FancyBrush.html +0 -82
  217. package/dist/paperjs/examples/Tools/Grid.html +0 -44
  218. package/dist/paperjs/examples/Tools/MultiLines.html +0 -44
  219. package/dist/paperjs/examples/Tools/MultipleTools.html +0 -44
  220. package/dist/paperjs/examples/Tools/PathEditing.html +0 -95
  221. package/dist/paperjs/examples/Tools/SquareRounded.html +0 -76
  222. package/dist/paperjs/examples/Tools/Stars.html +0 -38
  223. package/dist/paperjs/examples/Tools/Vektor.html +0 -200
  224. package/dist/paperjs/examples/Tools/Wave.html +0 -50
  225. package/dist/paperjs/examples/Tools/WormFarm.html +0 -88
  226. package/dist/paperjs/examples/Worker/Main.html +0 -53
  227. package/dist/paperjs/examples/Worker/Worker.js +0 -14
  228. package/dist/paperjs/examples/css/style.css +0 -12
@@ -1,939 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Segment</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>Segment</h1>
17
-
18
- <p>The Segment object represents the points of a path through which its <a href="../classes/Curve.html"><tt>Curve</tt></a> objects pass. The segments of a path can be accessed through its <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array.</p>
19
- <p>Each segment consists of an anchor point (<a href="../classes/Segment.html#point"><tt>segment.point</tt></a>) and optionally an incoming and an outgoing handle (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> and <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>), describing the tangents of the two <a href="../classes/Curve.html"><tt>Curve</tt></a> objects that are connected by this segment.</p>
20
-
21
- </div>
22
-
23
- <!-- =============================== constructors ========================== -->
24
- <div class="reference-members">
25
- <h2>Constructors</h2>
26
-
27
-
28
- <div id="segment" class="member">
29
- <div class="member-link">
30
- <a name="segment" href="#segment"><tt><b>Segment</b>([point[, handleIn[, handleOut]]])</tt></a>
31
- </div>
32
- <div class="member-description hidden">
33
- <div class="member-text">
34
- <p>Creates a new Segment object.</p>
35
-
36
-
37
- <ul class="member-list">
38
- <h4>Parameters:</h4>
39
-
40
- <li>
41
- <tt>point:</tt>
42
- <a href="../classes/Point.html"><tt>Point</tt></a>
43
- &mdash;&nbsp;the anchor point of the segment
44
- &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
45
- </li>
46
-
47
- <li>
48
- <tt>handleIn:</tt>
49
- <a href="../classes/Point.html"><tt>Point</tt></a>
50
- &mdash;&nbsp;the handle point relative to the anchor point of the segment that describes the in tangent of the segment
51
- &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
52
- </li>
53
-
54
- <li>
55
- <tt>handleOut:</tt>
56
- <a href="../classes/Point.html"><tt>Point</tt></a>
57
- &mdash;&nbsp;the handle point relative to the anchor point of the segment that describes the out tangent of the segment
58
- &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
59
- </li>
60
-
61
- </ul>
62
-
63
-
64
- <ul class="member-list">
65
- <h4>Returns:</h4>
66
-
67
- <li>
68
- <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
69
- </li>
70
-
71
-
72
- </ul>
73
-
74
-
75
-
76
-
77
- <h4>Example:</h4>
78
-
79
- <div class="paperscript split">
80
-
81
- <div class="buttons">
82
- <div class="button run">Run</div>
83
- </div>
84
-
85
- <script type="text/paperscript" canvas="canvas-0">
86
- var handleIn = new Point(-80, -100);
87
- var handleOut = new Point(80, 100);
88
-
89
- var firstPoint = new Point(100, 50);
90
- var firstSegment = new Segment(firstPoint, null, handleOut);
91
-
92
- var secondPoint = new Point(300, 50);
93
- var secondSegment = new Segment(secondPoint, handleIn, null);
94
-
95
- var path = new Path(firstSegment, secondSegment);
96
- path.strokeColor = 'black';
97
- </script>
98
- <div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
99
- </div>
100
-
101
-
102
- </div>
103
- </div>
104
- </div>
105
-
106
-
107
- <div id="segment-object" class="member">
108
- <div class="member-link">
109
- <a name="segment-object" href="#segment-object"><tt><b>Segment</b>(object)</tt></a>
110
- </div>
111
- <div class="member-description hidden">
112
- <div class="member-text">
113
- <p>Creates a new Segment object.</p>
114
-
115
-
116
- <ul class="member-list">
117
- <h4>Parameters:</h4>
118
-
119
- <li>
120
- <tt>object:</tt>
121
- <tt>Object</tt>
122
- &mdash;&nbsp;an object containing properties to be set on the segment
123
-
124
- </li>
125
-
126
- </ul>
127
-
128
-
129
- <ul class="member-list">
130
- <h4>Returns:</h4>
131
-
132
- <li>
133
- <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
134
- </li>
135
-
136
-
137
- </ul>
138
-
139
-
140
-
141
-
142
- <h4>Example:<span class="description">Creating segments using object notation:</span></h4>
143
-
144
- <div class="paperscript split">
145
-
146
- <div class="buttons">
147
- <div class="button run">Run</div>
148
- </div>
149
-
150
- <script type="text/paperscript" canvas="canvas-1">
151
- var firstSegment = new Segment({
152
- point: [100, 50],
153
- handleOut: [80, 100]
154
- });
155
-
156
- var secondSegment = new Segment({
157
- point: [300, 50],
158
- handleIn: [-80, -100]
159
- });
160
-
161
- var path = new Path({
162
- segments: [firstSegment, secondSegment],
163
- strokeColor: 'black'
164
- });
165
- </script>
166
- <div class="canvas"><canvas width="516" height="100" id="canvas-1"></canvas></div>
167
- </div>
168
-
169
-
170
- </div>
171
- </div>
172
- </div>
173
-
174
- </div>
175
-
176
-
177
-
178
-
179
-
180
- <!-- ================================ properties =========================== -->
181
- <div class="reference-members">
182
- <h2>Properties</h2>
183
-
184
-
185
- <div id="point" class="member">
186
- <div class="member-link">
187
- <a name="point" href="#point"><tt><b>point</b></tt></a>
188
- </div>
189
- <div class="member-description hidden">
190
-
191
- <div class="member-text">
192
- <p>The anchor point of the segment.</p>
193
-
194
-
195
-
196
- <ul class="member-list">
197
- <h4>Type:</h4>
198
- <li>
199
- <a href="../classes/Point.html"><tt>Point</tt></a>
200
- </li>
201
- </ul>
202
-
203
-
204
-
205
- </div>
206
-
207
- </div>
208
- </div>
209
-
210
-
211
- <div id="handlein" class="member">
212
- <div class="member-link">
213
- <a name="handlein" href="#handlein"><tt><b>handleIn</b></tt></a>
214
- </div>
215
- <div class="member-description hidden">
216
-
217
- <div class="member-text">
218
- <p>The handle point relative to the anchor point of the segment that describes the in tangent of the segment.</p>
219
-
220
-
221
-
222
- <ul class="member-list">
223
- <h4>Type:</h4>
224
- <li>
225
- <a href="../classes/Point.html"><tt>Point</tt></a>
226
- </li>
227
- </ul>
228
-
229
-
230
-
231
- </div>
232
-
233
- </div>
234
- </div>
235
-
236
-
237
- <div id="handleout" class="member">
238
- <div class="member-link">
239
- <a name="handleout" href="#handleout"><tt><b>handleOut</b></tt></a>
240
- </div>
241
- <div class="member-description hidden">
242
-
243
- <div class="member-text">
244
- <p>The handle point relative to the anchor point of the segment that describes the out tangent of the segment.</p>
245
-
246
-
247
-
248
- <ul class="member-list">
249
- <h4>Type:</h4>
250
- <li>
251
- <a href="../classes/Point.html"><tt>Point</tt></a>
252
- </li>
253
- </ul>
254
-
255
-
256
-
257
- </div>
258
-
259
- </div>
260
- </div>
261
-
262
-
263
- <div id="selected" class="member">
264
- <div class="member-link">
265
- <a name="selected" href="#selected"><tt><b>selected</b></tt></a>
266
- </div>
267
- <div class="member-description hidden">
268
-
269
- <div class="member-text">
270
- <p>Specifies whether the segment is selected.</p>
271
-
272
-
273
-
274
- <ul class="member-list">
275
- <h4>Type:</h4>
276
- <li>
277
- <tt>Boolean</tt>
278
- </li>
279
- </ul>
280
-
281
-
282
- <h4>Example:</h4>
283
-
284
- <div class="paperscript split">
285
-
286
- <div class="buttons">
287
- <div class="button run">Run</div>
288
- </div>
289
-
290
- <script type="text/paperscript" canvas="canvas-2">
291
- var path = new Path.Circle({
292
- center: [80, 50],
293
- radius: 40
294
- });
295
-
296
- // Select the third segment point:
297
- path.segments[2].selected = true;
298
- </script>
299
- <div class="canvas"><canvas width="516" height="100" id="canvas-2"></canvas></div>
300
- </div>
301
-
302
-
303
- </div>
304
-
305
- </div>
306
- </div>
307
-
308
-
309
- <h3>Hierarchy</h3>
310
-
311
- <div id="index" class="member">
312
- <div class="member-link">
313
- <a name="index" href="#index"><tt><b>index</b></tt></a>
314
- </div>
315
- <div class="member-description hidden">
316
-
317
- <div class="member-text">
318
- <p>The index of the segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array that the segment belongs to.</p>
319
-
320
- <p>Read only.</p>
321
-
322
-
323
-
324
- <ul class="member-list">
325
- <h4>Type:</h4>
326
- <li>
327
- <tt>Number</tt>
328
- </li>
329
- </ul>
330
-
331
-
332
-
333
- </div>
334
-
335
- </div>
336
- </div>
337
-
338
-
339
- <div id="path" class="member">
340
- <div class="member-link">
341
- <a name="path" href="#path"><tt><b>path</b></tt></a>
342
- </div>
343
- <div class="member-description hidden">
344
-
345
- <div class="member-text">
346
- <p>The path that the segment belongs to.</p>
347
-
348
- <p>Read only.</p>
349
-
350
-
351
-
352
- <ul class="member-list">
353
- <h4>Type:</h4>
354
- <li>
355
- <a href="../classes/Path.html"><tt>Path</tt></a>
356
- </li>
357
- </ul>
358
-
359
-
360
-
361
- </div>
362
-
363
- </div>
364
- </div>
365
-
366
-
367
- <div id="curve" class="member">
368
- <div class="member-link">
369
- <a name="curve" href="#curve"><tt><b>curve</b></tt></a>
370
- </div>
371
- <div class="member-description hidden">
372
-
373
- <div class="member-text">
374
- <p>The curve that the segment belongs to. For the last segment of an open path, the previous segment is returned.</p>
375
-
376
- <p>Read only.</p>
377
-
378
-
379
-
380
- <ul class="member-list">
381
- <h4>Type:</h4>
382
- <li>
383
- <a href="../classes/Curve.html"><tt>Curve</tt></a>
384
- </li>
385
- </ul>
386
-
387
-
388
-
389
- </div>
390
-
391
- </div>
392
- </div>
393
-
394
-
395
- <div id="location" class="member">
396
- <div class="member-link">
397
- <a name="location" href="#location"><tt><b>location</b></tt></a>
398
- </div>
399
- <div class="member-description hidden">
400
-
401
- <div class="member-text">
402
- <p>The curve location that describes this segment&rsquo;s position on the path.</p>
403
-
404
- <p>Read only.</p>
405
-
406
-
407
-
408
- <ul class="member-list">
409
- <h4>Type:</h4>
410
- <li>
411
- <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
412
- </li>
413
- </ul>
414
-
415
-
416
-
417
- </div>
418
-
419
- </div>
420
- </div>
421
-
422
-
423
- <h3>Sibling Segments</h3>
424
-
425
- <div id="next" class="member">
426
- <div class="member-link">
427
- <a name="next" href="#next"><tt><b>next</b></tt></a>
428
- </div>
429
- <div class="member-description hidden">
430
-
431
- <div class="member-text">
432
- <p>The next segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array that the segment belongs to. If the segments belongs to a closed path, the first segment is returned for the last segment of the path.</p>
433
-
434
- <p>Read only.</p>
435
-
436
-
437
-
438
- <ul class="member-list">
439
- <h4>Type:</h4>
440
- <li>
441
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
442
- </li>
443
- </ul>
444
-
445
-
446
-
447
- </div>
448
-
449
- </div>
450
- </div>
451
-
452
-
453
- <div id="previous" class="member">
454
- <div class="member-link">
455
- <a name="previous" href="#previous"><tt><b>previous</b></tt></a>
456
- </div>
457
- <div class="member-description hidden">
458
-
459
- <div class="member-text">
460
- <p>The previous segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array that the segment belongs to. If the segments belongs to a closed path, the last segment is returned for the first segment of the path.</p>
461
-
462
- <p>Read only.</p>
463
-
464
-
465
-
466
- <ul class="member-list">
467
- <h4>Type:</h4>
468
- <li>
469
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
470
- </li>
471
- </ul>
472
-
473
-
474
-
475
- </div>
476
-
477
- </div>
478
- </div>
479
-
480
- </div>
481
-
482
-
483
-
484
-
485
-
486
- <!-- ============================== methods ================================ -->
487
- <div class="reference-members">
488
- <h2>Methods</h2>
489
-
490
-
491
- <div id="hashandles" class="member">
492
- <div class="member-link">
493
- <a name="hashandles" href="#hashandles"><tt><b>hasHandles</b>()</tt></a>
494
- </div>
495
- <div class="member-description hidden">
496
- <div class="member-text">
497
- <p>Checks if the segment has any curve handles set.</p>
498
-
499
-
500
-
501
- <ul class="member-list">
502
- <h4>Returns:</h4>
503
-
504
- <li>
505
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment has handles set, <tt>false</tt> otherwise
506
- </li>
507
-
508
-
509
- </ul>
510
-
511
-
512
-
513
-
514
- <ul class="member-list">
515
- <h4>See also:</h4>
516
-
517
- <li><tt><a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a></tt></li>
518
-
519
- <li><tt><a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a></tt></li>
520
-
521
- <li><tt><a href="../classes/Curve.html#hashandles"><tt>curve.hasHandles</tt></a>()</tt></li>
522
-
523
- <li><tt><a href="../classes/Path.html#hashandles"><tt>path.hasHandles</tt></a>()</tt></li>
524
-
525
- </ul>
526
-
527
-
528
- </div>
529
- </div>
530
- </div>
531
-
532
-
533
- <div id="issmooth" class="member">
534
- <div class="member-link">
535
- <a name="issmooth" href="#issmooth"><tt><b>isSmooth</b>()</tt></a>
536
- </div>
537
- <div class="member-description hidden">
538
- <div class="member-text">
539
- <p>Checks if the segment connects two curves smoothly, meaning that its two handles are collinear and segment does not form a corner.</p>
540
-
541
-
542
-
543
- <ul class="member-list">
544
- <h4>Returns:</h4>
545
-
546
- <li>
547
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment is smooth, <tt>false</tt> otherwise
548
- </li>
549
-
550
-
551
- </ul>
552
-
553
-
554
-
555
-
556
- <ul class="member-list">
557
- <h4>See also:</h4>
558
-
559
- <li><tt><a href="../classes/Point.html#iscollinear"><tt>point.isCollinear</tt></a>()</tt></li>
560
-
561
- </ul>
562
-
563
-
564
- </div>
565
- </div>
566
- </div>
567
-
568
-
569
- <div id="clearhandles" class="member">
570
- <div class="member-link">
571
- <a name="clearhandles" href="#clearhandles"><tt><b>clearHandles</b>()</tt></a>
572
- </div>
573
- <div class="member-description hidden">
574
- <div class="member-text">
575
- <p>Clears the segment&rsquo;s handles by setting their coordinates to zero, turning the segment into a corner.</p>
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
- </div>
584
- </div>
585
- </div>
586
-
587
-
588
- <div id="smooth" class="member">
589
- <div class="member-link">
590
- <a name="smooth" href="#smooth"><tt><b>smooth</b>([options])</tt></a>
591
- </div>
592
- <div class="member-description hidden">
593
- <div class="member-text">
594
- <p>Smooths the bezier curves that pass through this segment by taking into account the segment&rsquo;s position and distance to the neighboring segments and changing the direction and length of the segment&rsquo;s handles accordingly without moving the segment itself.</p>
595
- <p>Two different smoothing methods are available:</p>
596
- <ul>
597
- <li>
598
- <p><code>&#39;catmull-rom&#39;</code> uses the Catmull-Rom spline to smooth the segment.</p>
599
- <p>The optionally passed factor controls the knot parametrization of the algorithm:</p>
600
- <ul>
601
- <li><code>0.0</code>: the standard, uniform Catmull-Rom spline</li>
602
- <li><code>0.5</code>: the centripetal Catmull-Rom spline, guaranteeing no self-intersections</li>
603
- <li><code>1.0</code>: the chordal Catmull-Rom spline</li>
604
- </ul>
605
- </li>
606
- <li>
607
- <p><code>&#39;geometric&#39;</code> use a simple heuristic and empiric geometric method to smooth the segment&rsquo;s handles. The handles were weighted, meaning that big differences in distances between the segments will lead to probably undesired results.</p>
608
- <p>The optionally passed factor defines the tension parameter (<code>0…1</code>), controlling the amount of smoothing as a factor by which to scale each handle.</p>
609
- </li>
610
- </ul>
611
- <ul class="member-list">
612
- <h4>Options:</h4>
613
- <li><tt>options.type: <tt>String</tt></tt> &mdash; the type of smoothing method: <tt>&lsquo;catmull-rom&rsquo;</tt>, <tt>&lsquo;geometric&rsquo;</tt> &mdash;&nbsp;default: <tt>&lsquo;catmull-rom&rsquo;</tt></li>
614
- <li><tt>options.factor: <tt>Number</tt></tt> &mdash; the factor parameterizing the smoothing method — default: <code>0.5</code> for <code>&#39;catmull-rom&#39;</code>, <code>0.4</code> for <code>&#39;geometric&#39;</code></li>
615
- </ul>
616
-
617
- <ul class="member-list">
618
- <h4>Parameters:</h4>
619
-
620
- <li>
621
- <tt>options:</tt>
622
- <tt>Object</tt>
623
- &mdash;&nbsp;the smoothing options
624
- &mdash;&nbsp;optional
625
- </li>
626
-
627
- </ul>
628
-
629
-
630
-
631
-
632
-
633
- <ul class="member-list">
634
- <h4>See also:</h4>
635
-
636
- <li><tt><a href="../classes/PathItem.html#smooth"><tt>pathItem.smooth([options])</tt></a></tt></li>
637
-
638
- </ul>
639
-
640
-
641
- </div>
642
- </div>
643
- </div>
644
-
645
-
646
- <div id="isfirst" class="member">
647
- <div class="member-link">
648
- <a name="isfirst" href="#isfirst"><tt><b>isFirst</b>()</tt></a>
649
- </div>
650
- <div class="member-description hidden">
651
- <div class="member-text">
652
- <p>Checks if the this is the first segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array.</p>
653
-
654
-
655
-
656
- <ul class="member-list">
657
- <h4>Returns:</h4>
658
-
659
- <li>
660
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the first segment, <tt>false</tt> otherwise
661
- </li>
662
-
663
-
664
- </ul>
665
-
666
-
667
-
668
-
669
-
670
- </div>
671
- </div>
672
- </div>
673
-
674
-
675
- <div id="islast" class="member">
676
- <div class="member-link">
677
- <a name="islast" href="#islast"><tt><b>isLast</b>()</tt></a>
678
- </div>
679
- <div class="member-description hidden">
680
- <div class="member-text">
681
- <p>Checks if the this is the last segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array.</p>
682
-
683
-
684
-
685
- <ul class="member-list">
686
- <h4>Returns:</h4>
687
-
688
- <li>
689
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the last segment, <tt>false</tt> otherwise
690
- </li>
691
-
692
-
693
- </ul>
694
-
695
-
696
-
697
-
698
-
699
- </div>
700
- </div>
701
- </div>
702
-
703
-
704
- <div id="reverse" class="member">
705
- <div class="member-link">
706
- <a name="reverse" href="#reverse"><tt><b>reverse</b>()</tt></a>
707
- </div>
708
- <div class="member-description hidden">
709
- <div class="member-text">
710
- <p>Reverses the <a href="../classes/Segment.html#handlein"><tt>handleIn</tt></a> and <a href="../classes/Segment.html#handleout"><tt>handleOut</tt></a> vectors of this segment, modifying the actual segment without creating a copy.</p>
711
-
712
-
713
-
714
- <ul class="member-list">
715
- <h4>Returns:</h4>
716
-
717
- <li>
718
- <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>&nbsp;&mdash;&nbsp;the reversed segment
719
- </li>
720
-
721
-
722
- </ul>
723
-
724
-
725
-
726
-
727
-
728
- </div>
729
- </div>
730
- </div>
731
-
732
-
733
- <div id="reversed" class="member">
734
- <div class="member-link">
735
- <a name="reversed" href="#reversed"><tt><b>reversed</b>()</tt></a>
736
- </div>
737
- <div class="member-description hidden">
738
- <div class="member-text">
739
- <p>Returns the reversed the segment, without modifying the segment itself.</p>
740
-
741
-
742
-
743
- <ul class="member-list">
744
- <h4>Returns:</h4>
745
-
746
- <li>
747
- <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>&nbsp;&mdash;&nbsp;the reversed segment
748
- </li>
749
-
750
-
751
- </ul>
752
-
753
-
754
-
755
-
756
-
757
- </div>
758
- </div>
759
- </div>
760
-
761
-
762
- <div id="remove" class="member">
763
- <div class="member-link">
764
- <a name="remove" href="#remove"><tt><b>remove</b>()</tt></a>
765
- </div>
766
- <div class="member-description hidden">
767
- <div class="member-text">
768
- <p>Removes the segment from the path that it belongs to.</p>
769
-
770
-
771
-
772
- <ul class="member-list">
773
- <h4>Returns:</h4>
774
-
775
- <li>
776
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment was removed, <tt>false</tt> otherwise
777
- </li>
778
-
779
-
780
- </ul>
781
-
782
-
783
-
784
-
785
-
786
- </div>
787
- </div>
788
- </div>
789
-
790
-
791
- <div id="clone" class="member">
792
- <div class="member-link">
793
- <a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
794
- </div>
795
- <div class="member-description hidden">
796
- <div class="member-text">
797
-
798
-
799
-
800
-
801
- <ul class="member-list">
802
- <h4>Returns:</h4>
803
-
804
- <li>
805
- <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
806
- </li>
807
-
808
-
809
- </ul>
810
-
811
-
812
-
813
-
814
-
815
- </div>
816
- </div>
817
- </div>
818
-
819
-
820
- <div id="tostring" class="member">
821
- <div class="member-link">
822
- <a name="tostring" href="#tostring"><tt><b>toString</b>()</tt></a>
823
- </div>
824
- <div class="member-description hidden">
825
- <div class="member-text">
826
-
827
-
828
-
829
-
830
- <ul class="member-list">
831
- <h4>Returns:</h4>
832
-
833
- <li>
834
- <tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;a string representation of the segment
835
- </li>
836
-
837
-
838
- </ul>
839
-
840
-
841
-
842
-
843
-
844
- </div>
845
- </div>
846
- </div>
847
-
848
-
849
- <div id="transform-matrix" class="member">
850
- <div class="member-link">
851
- <a name="transform-matrix" href="#transform-matrix"><tt><b>transform</b>(matrix)</tt></a>
852
- </div>
853
- <div class="member-description hidden">
854
- <div class="member-text">
855
- <p>Transform the segment by the specified matrix.</p>
856
-
857
-
858
- <ul class="member-list">
859
- <h4>Parameters:</h4>
860
-
861
- <li>
862
- <tt>matrix:</tt>
863
- <a href="../classes/Matrix.html"><tt>Matrix</tt></a>
864
- &mdash;&nbsp;the matrix to transform the segment by
865
-
866
- </li>
867
-
868
- </ul>
869
-
870
-
871
-
872
-
873
-
874
-
875
- </div>
876
- </div>
877
- </div>
878
-
879
-
880
- <div id="interpolate-from-to-factor" class="member">
881
- <div class="member-link">
882
- <a name="interpolate-from-to-factor" href="#interpolate-from-to-factor"><tt><b>interpolate</b>(from, to, factor)</tt></a>
883
- </div>
884
- <div class="member-description hidden">
885
- <div class="member-text">
886
- <p>Interpolates between the two specified segments and sets the point and handles of this segment accordingly.</p>
887
-
888
-
889
- <ul class="member-list">
890
- <h4>Parameters:</h4>
891
-
892
- <li>
893
- <tt>from:</tt>
894
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
895
- &mdash;&nbsp;the segment defining the geometry when <code>factor</code> is <code>0</code>
896
-
897
- </li>
898
-
899
- <li>
900
- <tt>to:</tt>
901
- <a href="../classes/Segment.html"><tt>Segment</tt></a>
902
- &mdash;&nbsp;the segment defining the geometry when <code>factor</code> is <code>1</code>
903
-
904
- </li>
905
-
906
- <li>
907
- <tt>factor:</tt>
908
- <tt>Number</tt>
909
- &mdash;&nbsp;the interpolation coefficient, typically between <code>0</code> and <code>1</code>, but extrapolation is possible too
910
-
911
- </li>
912
-
913
- </ul>
914
-
915
-
916
-
917
-
918
-
919
-
920
- </div>
921
- </div>
922
- </div>
923
-
924
-
925
-
926
- </div>
927
-
928
-
929
-
930
-
931
- <!-- =========================== copyright notice ========================== -->
932
- <p class="footer">
933
- Paper.js v0.12.17<br>
934
- Copyright &#169; 2011—2022 <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>
935
- <div class="content-end"></div>
936
-
937
-
938
- </article>
939
- </body>