mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Some clean-up work on documentation.
This commit is contained in:
parent
3f509ed51b
commit
3d89cd71bd
4 changed files with 20 additions and 12 deletions
|
@ -322,9 +322,11 @@ var Curve = Base.extend(/** @lends Curve# */{
|
|||
},
|
||||
|
||||
/**
|
||||
* Checks if this curve defines any curve handle.
|
||||
* Checks if this curve has any curve handles set.
|
||||
*
|
||||
* @return {Boolean} {@true if the curve has handles defined}
|
||||
* @return {Boolean} {@true if the curve has handles set}
|
||||
* @see Curve#getHandle1()
|
||||
* @see Curve#getHandle2()
|
||||
* @see Segment#hasHandles()
|
||||
* @see Path#hasHandles()
|
||||
*/
|
||||
|
@ -360,7 +362,7 @@ var Curve = Base.extend(/** @lends Curve# */{
|
|||
* Checks if the the two curves describe lines that are collinear, meaning
|
||||
* they run in parallel.
|
||||
*
|
||||
* @param {Curve} the other curve to check against
|
||||
* @param {Curve} curve the other curve to check against
|
||||
* @return {Boolean} {@true if the two lines are collinear}
|
||||
* @see Segment#isCollinear(segment)
|
||||
*/
|
||||
|
@ -380,7 +382,14 @@ var Curve = Base.extend(/** @lends Curve# */{
|
|||
return Segment.isOrthogonalArc(this._segment1, this._segment2);
|
||||
},
|
||||
|
||||
// DOCS: Curve#getIntersections()
|
||||
/**
|
||||
* Returns all intersections between two {@link Curve} objects as an array
|
||||
* of {@link CurveLocation} objects.
|
||||
*
|
||||
* @param {Curve} curve the other curve to find the intersections with
|
||||
* @return {CurveLocation[]} the locations of all intersection between the
|
||||
* curves
|
||||
*/
|
||||
getIntersections: function(curve) {
|
||||
return Curve.filterIntersections(Curve.getIntersections(
|
||||
this.getValues(), curve.getValues(), this, curve, []));
|
||||
|
|
|
@ -776,9 +776,9 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
clear: '#removeSegments',
|
||||
|
||||
/**
|
||||
* Checks if none of the curves in the path define any curve handles.
|
||||
* Checks if any of the curves in the path have curve handles set.
|
||||
*
|
||||
* @return {Boolean} {@true if the path contains no curve handles}
|
||||
* @return {Boolean} {@true if the path has curve handles set}
|
||||
* @see Segment#hasHandles()
|
||||
* @see Curve#hasHandles()
|
||||
*/
|
||||
|
|
|
@ -32,8 +32,6 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
* supported.
|
||||
*
|
||||
* @param {PathItem} path the other item to find the intersections with
|
||||
* @param {Boolean} [sorted=false] specifies whether the returned
|
||||
* {@link CurveLocation} objects should be sorted by path and offset
|
||||
* @return {CurveLocation[]} the locations of all intersection between the
|
||||
* paths
|
||||
* @example {@paperscript} // Finding the intersections between two paths
|
||||
|
|
|
@ -230,10 +230,11 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
},
|
||||
|
||||
/**
|
||||
* Checks whether the segment has curve handles defined, meaning it is not
|
||||
* a straight segment.
|
||||
* Checks if the segment has any curve handles set.
|
||||
*
|
||||
* @return {Boolean} {@true if the segment has handles defined}
|
||||
* @return {Boolean} {@true if the segment has handles set}
|
||||
* @see Segment#getHandleIn()
|
||||
* @see Segment#getHandleOut()
|
||||
* @see Curve#hasHandles()
|
||||
* @see Path#hasHandles()
|
||||
*/
|
||||
|
@ -268,7 +269,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
* Checks if the the two segments are the beginning of two lines that are
|
||||
* collinear, meaning they run in parallel.
|
||||
*
|
||||
* @param {Segment} the other segment to check against
|
||||
* @param {Segment} segment the other segment to check against
|
||||
* @return {Boolean} {@true if the two lines are collinear}
|
||||
* @see Curve#isCollinear(curve)
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue