Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

938 lines
19 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. <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>
  18. <p>Each segment consists of an anchor point (<a href="../classes/Segment.html#point"><tt>segment.point</tt></a>) and optionaly 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>
  19. </div>
  20. <!-- =============================== constructors ========================== -->
  21. <div class="reference-members">
  22. <h2>Constructors</h2>
  23. <div id="segment" class="member">
  24. <div class="member-link">
  25. <a name="segment" href="#segment"><tt><b>Segment</b>([point[, handleIn[, handleOut]]])</tt></a>
  26. </div>
  27. <div class="member-description hidden">
  28. <div class="member-text">
  29. <p>Creates a new Segment object.</p>
  30. <ul class="member-list">
  31. <h4>Parameters:</h4>
  32. <li>
  33. <tt>point:</tt>
  34. <a href="../classes/Point.html"><tt>Point</tt></a>
  35. &mdash;&nbsp;the anchor point of the segment
  36. &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
  37. </li>
  38. <li>
  39. <tt>handleIn:</tt>
  40. <a href="../classes/Point.html"><tt>Point</tt></a>
  41. &mdash;&nbsp;the handle point relative to the anchor point of the segment that describes the in tangent of the segment
  42. &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
  43. </li>
  44. <li>
  45. <tt>handleOut:</tt>
  46. <a href="../classes/Point.html"><tt>Point</tt></a>
  47. &mdash;&nbsp;the handle point relative to the anchor point of the segment that describes the out tangent of the segment
  48. &mdash;&nbsp;optional, default: <tt>{x: 0, y: 0}</tt>
  49. </li>
  50. </ul>
  51. <ul class="member-list">
  52. <h4>Returns:</h4>
  53. <li>
  54. <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
  55. </li>
  56. </ul>
  57. <h4>Example:</h4>
  58. <div class="paperscript split">
  59. <div class="buttons">
  60. <div class="button run">Run</div>
  61. </div>
  62. <script type="text/paperscript" canvas="canvas-0">
  63. var handleIn = new Point(-80, -100);
  64. var handleOut = new Point(80, 100);
  65. var firstPoint = new Point(100, 50);
  66. var firstSegment = new Segment(firstPoint, null, handleOut);
  67. var secondPoint = new Point(300, 50);
  68. var secondSegment = new Segment(secondPoint, handleIn, null);
  69. var path = new Path(firstSegment, secondSegment);
  70. path.strokeColor = 'black';
  71. </script>
  72. <div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <div id="segment-object" class="member">
  78. <div class="member-link">
  79. <a name="segment-object" href="#segment-object"><tt><b>Segment</b>(object)</tt></a>
  80. </div>
  81. <div class="member-description hidden">
  82. <div class="member-text">
  83. <p>Creates a new Segment object.</p>
  84. <ul class="member-list">
  85. <h4>Parameters:</h4>
  86. <li>
  87. <tt>object:</tt>
  88. <tt>Object</tt>
  89. &mdash;&nbsp;an object containing properties to be set on the segment
  90. </li>
  91. </ul>
  92. <ul class="member-list">
  93. <h4>Returns:</h4>
  94. <li>
  95. <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
  96. </li>
  97. </ul>
  98. <h4>Example:<span class="description">Creating segments using object notation:</span></h4>
  99. <div class="paperscript split">
  100. <div class="buttons">
  101. <div class="button run">Run</div>
  102. </div>
  103. <script type="text/paperscript" canvas="canvas-1">
  104. var firstSegment = new Segment({
  105. point: [100, 50],
  106. handleOut: [80, 100]
  107. });
  108. var secondSegment = new Segment({
  109. point: [300, 50],
  110. handleIn: [-80, -100]
  111. });
  112. var path = new Path({
  113. segments: [firstSegment, secondSegment],
  114. strokeColor: 'black'
  115. });
  116. </script>
  117. <div class="canvas"><canvas width="516" height="100" id="canvas-1"></canvas></div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <!-- ================================ properties =========================== -->
  124. <div class="reference-members">
  125. <h2>Properties</h2>
  126. <div id="point" class="member">
  127. <div class="member-link">
  128. <a name="point" href="#point"><tt><b>point</b></tt></a>
  129. </div>
  130. <div class="member-description hidden">
  131. <div class="member-text">
  132. <p>The anchor point of the segment.</p>
  133. <ul class="member-list">
  134. <h4>Type:</h4>
  135. <li>
  136. <a href="../classes/Point.html"><tt>Point</tt></a>
  137. </li>
  138. </ul>
  139. </div>
  140. </div>
  141. </div>
  142. <div id="handlein" class="member">
  143. <div class="member-link">
  144. <a name="handlein" href="#handlein"><tt><b>handleIn</b></tt></a>
  145. </div>
  146. <div class="member-description hidden">
  147. <div class="member-text">
  148. <p>The handle point relative to the anchor point of the segment that describes the in tangent of the segment.</p>
  149. <ul class="member-list">
  150. <h4>Type:</h4>
  151. <li>
  152. <a href="../classes/Point.html"><tt>Point</tt></a>
  153. </li>
  154. </ul>
  155. </div>
  156. </div>
  157. </div>
  158. <div id="handleout" class="member">
  159. <div class="member-link">
  160. <a name="handleout" href="#handleout"><tt><b>handleOut</b></tt></a>
  161. </div>
  162. <div class="member-description hidden">
  163. <div class="member-text">
  164. <p>The handle point relative to the anchor point of the segment that describes the out tangent of the segment.</p>
  165. <ul class="member-list">
  166. <h4>Type:</h4>
  167. <li>
  168. <a href="../classes/Point.html"><tt>Point</tt></a>
  169. </li>
  170. </ul>
  171. </div>
  172. </div>
  173. </div>
  174. <div id="selected" class="member">
  175. <div class="member-link">
  176. <a name="selected" href="#selected"><tt><b>selected</b></tt></a>
  177. </div>
  178. <div class="member-description hidden">
  179. <div class="member-text">
  180. <p>Specifies whether the segment is selected.</p>
  181. <ul class="member-list">
  182. <h4>Type:</h4>
  183. <li>
  184. <tt>Boolean</tt>
  185. </li>
  186. </ul>
  187. <h4>Example:</h4>
  188. <div class="paperscript split">
  189. <div class="buttons">
  190. <div class="button run">Run</div>
  191. </div>
  192. <script type="text/paperscript" canvas="canvas-2">
  193. var path = new Path.Circle({
  194. center: [80, 50],
  195. radius: 40
  196. });
  197. // Select the third segment point:
  198. path.segments[2].selected = true;
  199. </script>
  200. <div class="canvas"><canvas width="516" height="100" id="canvas-2"></canvas></div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <h3>Hierarchy</h3>
  206. <div id="index" class="member">
  207. <div class="member-link">
  208. <a name="index" href="#index"><tt><b>index</b></tt></a>
  209. </div>
  210. <div class="member-description hidden">
  211. <div class="member-text">
  212. <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>
  213. <p>Read only.</p>
  214. <ul class="member-list">
  215. <h4>Type:</h4>
  216. <li>
  217. <tt>Number</tt>
  218. </li>
  219. </ul>
  220. </div>
  221. </div>
  222. </div>
  223. <div id="path" class="member">
  224. <div class="member-link">
  225. <a name="path" href="#path"><tt><b>path</b></tt></a>
  226. </div>
  227. <div class="member-description hidden">
  228. <div class="member-text">
  229. <p>The path that the segment belongs to.</p>
  230. <p>Read only.</p>
  231. <ul class="member-list">
  232. <h4>Type:</h4>
  233. <li>
  234. <a href="../classes/Path.html"><tt>Path</tt></a>
  235. </li>
  236. </ul>
  237. </div>
  238. </div>
  239. </div>
  240. <div id="curve" class="member">
  241. <div class="member-link">
  242. <a name="curve" href="#curve"><tt><b>curve</b></tt></a>
  243. </div>
  244. <div class="member-description hidden">
  245. <div class="member-text">
  246. <p>The curve that the segment belongs to. For the last segment of an open path, the previous segment is returned.</p>
  247. <p>Read only.</p>
  248. <ul class="member-list">
  249. <h4>Type:</h4>
  250. <li>
  251. <a href="../classes/Curve.html"><tt>Curve</tt></a>
  252. </li>
  253. </ul>
  254. </div>
  255. </div>
  256. </div>
  257. <div id="location" class="member">
  258. <div class="member-link">
  259. <a name="location" href="#location"><tt><b>location</b></tt></a>
  260. </div>
  261. <div class="member-description hidden">
  262. <div class="member-text">
  263. <p>The curve location that describes this segment&rsquo;s position on the path.</p>
  264. <p>Read only.</p>
  265. <ul class="member-list">
  266. <h4>Type:</h4>
  267. <li>
  268. <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
  269. </li>
  270. </ul>
  271. </div>
  272. </div>
  273. </div>
  274. <h3>Sibling Segments</h3>
  275. <div id="next" class="member">
  276. <div class="member-link">
  277. <a name="next" href="#next"><tt><b>next</b></tt></a>
  278. </div>
  279. <div class="member-description hidden">
  280. <div class="member-text">
  281. <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>
  282. <p>Read only.</p>
  283. <ul class="member-list">
  284. <h4>Type:</h4>
  285. <li>
  286. <a href="../classes/Segment.html"><tt>Segment</tt></a>
  287. </li>
  288. </ul>
  289. </div>
  290. </div>
  291. </div>
  292. <div id="previous" class="member">
  293. <div class="member-link">
  294. <a name="previous" href="#previous"><tt><b>previous</b></tt></a>
  295. </div>
  296. <div class="member-description hidden">
  297. <div class="member-text">
  298. <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>
  299. <p>Read only.</p>
  300. <ul class="member-list">
  301. <h4>Type:</h4>
  302. <li>
  303. <a href="../classes/Segment.html"><tt>Segment</tt></a>
  304. </li>
  305. </ul>
  306. </div>
  307. </div>
  308. </div>
  309. </div>
  310. <!-- ============================== methods ================================ -->
  311. <div class="reference-members">
  312. <h2>Methods</h2>
  313. <div id="hashandles" class="member">
  314. <div class="member-link">
  315. <a name="hashandles" href="#hashandles"><tt><b>hasHandles</b>()</tt></a>
  316. </div>
  317. <div class="member-description hidden">
  318. <div class="member-text">
  319. <p>Checks if the segment has any curve handles set.</p>
  320. <ul class="member-list">
  321. <h4>Returns:</h4>
  322. <li>
  323. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment has handles set, <tt>false</tt> otherwise
  324. </li>
  325. </ul>
  326. <ul class="member-list">
  327. <h4>See also:</h4>
  328. <li><tt><a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a></tt></li>
  329. <li><tt><a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a></tt></li>
  330. <li><tt><a href="../classes/Curve.html#hashandles"><tt>curve.hasHandles</tt></a>()</tt></li>
  331. <li><tt><a href="../classes/Path.html#hashandles"><tt>path.hasHandles</tt></a>()</tt></li>
  332. </ul>
  333. </div>
  334. </div>
  335. </div>
  336. <div id="issmooth" class="member">
  337. <div class="member-link">
  338. <a name="issmooth" href="#issmooth"><tt><b>isSmooth</b>()</tt></a>
  339. </div>
  340. <div class="member-description hidden">
  341. <div class="member-text">
  342. <p>Checks if the segment connects two curves smoothly, meaning that its two handles are collinear and segment does not form a corner.</p>
  343. <ul class="member-list">
  344. <h4>Returns:</h4>
  345. <li>
  346. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment is smooth, <tt>false</tt> otherwise
  347. </li>
  348. </ul>
  349. <ul class="member-list">
  350. <h4>See also:</h4>
  351. <li><tt><a href="../classes/Point.html#iscollinear"><tt>point.isCollinear</tt></a>()</tt></li>
  352. </ul>
  353. </div>
  354. </div>
  355. </div>
  356. <div id="clearhandles" class="member">
  357. <div class="member-link">
  358. <a name="clearhandles" href="#clearhandles"><tt><b>clearHandles</b>()</tt></a>
  359. </div>
  360. <div class="member-description hidden">
  361. <div class="member-text">
  362. <p>Clears the segment&rsquo;s handles by setting their coordinates to zero, turning the segment into a corner.</p>
  363. </div>
  364. </div>
  365. </div>
  366. <div id="smooth" class="member">
  367. <div class="member-link">
  368. <a name="smooth" href="#smooth"><tt><b>smooth</b>([options])</tt></a>
  369. </div>
  370. <div class="member-description hidden">
  371. <div class="member-text">
  372. <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>
  373. <p>Two different smoothing methods are available:</p>
  374. <ul>
  375. <li>
  376. <p><code>&#39;catmull-rom&#39;</code> uses the Catmull-Rom spline to smooth the segment.</p>
  377. <p>The optionally passed factor controls the knot parametrization of the algorithm:</p>
  378. <ul>
  379. <li><code>0.0</code>: the standard, uniform Catmull-Rom spline</li>
  380. <li><code>0.5</code>: the centripetal Catmull-Rom spline, guaranteeing no self-intersections</li>
  381. <li><code>1.0</code>: the chordal Catmull-Rom spline</li>
  382. </ul>
  383. </li>
  384. <li>
  385. <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>
  386. <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>
  387. </li>
  388. </ul>
  389. <ul class="member-list">
  390. <h4>Options:</h4>
  391. <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>
  392. <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>
  393. </ul>
  394. <ul class="member-list">
  395. <h4>Parameters:</h4>
  396. <li>
  397. <tt>options:</tt>
  398. <tt>Object</tt>
  399. &mdash;&nbsp;the smoothing options
  400. &mdash;&nbsp;optional
  401. </li>
  402. </ul>
  403. <ul class="member-list">
  404. <h4>See also:</h4>
  405. <li><tt><a href="../classes/PathItem.html#smooth"><tt>pathItem.smooth([options])</tt></a></tt></li>
  406. </ul>
  407. </div>
  408. </div>
  409. </div>
  410. <div id="isfirst" class="member">
  411. <div class="member-link">
  412. <a name="isfirst" href="#isfirst"><tt><b>isFirst</b>()</tt></a>
  413. </div>
  414. <div class="member-description hidden">
  415. <div class="member-text">
  416. <p>Checks if the this is the first segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array.</p>
  417. <ul class="member-list">
  418. <h4>Returns:</h4>
  419. <li>
  420. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the first segment, <tt>false</tt> otherwise
  421. </li>
  422. </ul>
  423. </div>
  424. </div>
  425. </div>
  426. <div id="islast" class="member">
  427. <div class="member-link">
  428. <a name="islast" href="#islast"><tt><b>isLast</b>()</tt></a>
  429. </div>
  430. <div class="member-description hidden">
  431. <div class="member-text">
  432. <p>Checks if the this is the last segment in the <a href="../classes/Path.html#segments"><tt>path.segments</tt></a> array.</p>
  433. <ul class="member-list">
  434. <h4>Returns:</h4>
  435. <li>
  436. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if this is the last segment, <tt>false</tt> otherwise
  437. </li>
  438. </ul>
  439. </div>
  440. </div>
  441. </div>
  442. <div id="reverse" class="member">
  443. <div class="member-link">
  444. <a name="reverse" href="#reverse"><tt><b>reverse</b>()</tt></a>
  445. </div>
  446. <div class="member-description hidden">
  447. <div class="member-text">
  448. <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>
  449. <ul class="member-list">
  450. <h4>Returns:</h4>
  451. <li>
  452. <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>&nbsp;&mdash;&nbsp;the reversed segment
  453. </li>
  454. </ul>
  455. </div>
  456. </div>
  457. </div>
  458. <div id="reversed" class="member">
  459. <div class="member-link">
  460. <a name="reversed" href="#reversed"><tt><b>reversed</b>()</tt></a>
  461. </div>
  462. <div class="member-description hidden">
  463. <div class="member-text">
  464. <p>Returns the reversed the segment, without modifying the segment itself.</p>
  465. <ul class="member-list">
  466. <h4>Returns:</h4>
  467. <li>
  468. <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>&nbsp;&mdash;&nbsp;the reversed segment
  469. </li>
  470. </ul>
  471. </div>
  472. </div>
  473. </div>
  474. <div id="remove" class="member">
  475. <div class="member-link">
  476. <a name="remove" href="#remove"><tt><b>remove</b>()</tt></a>
  477. </div>
  478. <div class="member-description hidden">
  479. <div class="member-text">
  480. <p>Removes the segment from the path that it belongs to.</p>
  481. <ul class="member-list">
  482. <h4>Returns:</h4>
  483. <li>
  484. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the segment was removed, <tt>false</tt> otherwise
  485. </li>
  486. </ul>
  487. </div>
  488. </div>
  489. </div>
  490. <div id="clone" class="member">
  491. <div class="member-link">
  492. <a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
  493. </div>
  494. <div class="member-description hidden">
  495. <div class="member-text">
  496. <ul class="member-list">
  497. <h4>Returns:</h4>
  498. <li>
  499. <tt><a href="../classes/Segment.html"><tt>Segment</tt></a></tt>
  500. </li>
  501. </ul>
  502. </div>
  503. </div>
  504. </div>
  505. <div id="tostring" class="member">
  506. <div class="member-link">
  507. <a name="tostring" href="#tostring"><tt><b>toString</b>()</tt></a>
  508. </div>
  509. <div class="member-description hidden">
  510. <div class="member-text">
  511. <ul class="member-list">
  512. <h4>Returns:</h4>
  513. <li>
  514. <tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;a string representation of the segment
  515. </li>
  516. </ul>
  517. </div>
  518. </div>
  519. </div>
  520. <div id="transform-matrix" class="member">
  521. <div class="member-link">
  522. <a name="transform-matrix" href="#transform-matrix"><tt><b>transform</b>(matrix)</tt></a>
  523. </div>
  524. <div class="member-description hidden">
  525. <div class="member-text">
  526. <p>Transform the segment by the specified matrix.</p>
  527. <ul class="member-list">
  528. <h4>Parameters:</h4>
  529. <li>
  530. <tt>matrix:</tt>
  531. <a href="../classes/Matrix.html"><tt>Matrix</tt></a>
  532. &mdash;&nbsp;the matrix to transform the segment by
  533. </li>
  534. </ul>
  535. </div>
  536. </div>
  537. </div>
  538. <div id="interpolate-from-to-factor" class="member">
  539. <div class="member-link">
  540. <a name="interpolate-from-to-factor" href="#interpolate-from-to-factor"><tt><b>interpolate</b>(from, to, factor)</tt></a>
  541. </div>
  542. <div class="member-description hidden">
  543. <div class="member-text">
  544. <p>Interpolates between the two specified segments and sets the point and handles of this segment accordingly.</p>
  545. <ul class="member-list">
  546. <h4>Parameters:</h4>
  547. <li>
  548. <tt>from:</tt>
  549. <a href="../classes/Segment.html"><tt>Segment</tt></a>
  550. &mdash;&nbsp;the segment defining the geometry when <code>factor</code> is <code>0</code>
  551. </li>
  552. <li>
  553. <tt>to:</tt>
  554. <a href="../classes/Segment.html"><tt>Segment</tt></a>
  555. &mdash;&nbsp;the segment defining the geometry when <code>factor</code> is <code>1</code>
  556. </li>
  557. <li>
  558. <tt>factor:</tt>
  559. <tt>Number</tt>
  560. &mdash;&nbsp;the interpolation coefficient, typically between <code>0</code> and <code>1</code>, but extrapolation is possible too
  561. </li>
  562. </ul>
  563. </div>
  564. </div>
  565. </div>
  566. </div>
  567. <!-- =========================== copyright notice ========================== -->
  568. <p class="footer">
  569. Paper.js v0.12.15<br>
  570. Copyright &#169; 2011—2021 <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>
  571. <div class="content-end"></div>
  572. </article>
  573. </body>