mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Various minor documentation fixes (mainly capitalization).
This commit is contained in:
parent
1e97b405ba
commit
16e42c68fd
5 changed files with 31 additions and 31 deletions
|
@ -66,8 +66,8 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
|
||||||
* constructor figures out how to fit a rectangle between them.
|
* constructor figures out how to fit a rectangle between them.
|
||||||
*
|
*
|
||||||
* @name Rectangle#initialize
|
* @name Rectangle#initialize
|
||||||
* @param {Point} from The first point defining the rectangle
|
* @param {Point} from the first point defining the rectangle
|
||||||
* @param {Point} to The second point defining the rectangle
|
* @param {Point} to the second point defining the rectangle
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Creates a new rectangle object from the passed rectangle object.
|
* Creates a new rectangle object from the passed rectangle object.
|
||||||
|
@ -528,7 +528,7 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
|
||||||
*
|
*
|
||||||
* @name Rectangle#contains
|
* @name Rectangle#contains
|
||||||
* @function
|
* @function
|
||||||
* @param {Rectangle} rect The specified rectangle
|
* @param {Rectangle} rect the specified rectangle
|
||||||
* @return {Boolean} {@true if the rectangle entirely contains the specified
|
* @return {Boolean} {@true if the rectangle entirely contains the specified
|
||||||
* rectangle}
|
* rectangle}
|
||||||
*
|
*
|
||||||
|
@ -659,7 +659,7 @@ var Rectangle = Base.extend(/** @lends Rectangle# */{
|
||||||
* Returns a new rectangle representing the intersection of this rectangle
|
* Returns a new rectangle representing the intersection of this rectangle
|
||||||
* with the specified rectangle.
|
* with the specified rectangle.
|
||||||
*
|
*
|
||||||
* @param {Rectangle} rect The rectangle to be intersected with this
|
* @param {Rectangle} rect the rectangle to be intersected with this
|
||||||
* rectangle
|
* rectangle
|
||||||
* @return {Rectangle} the largest rectangle contained in both the specified
|
* @return {Rectangle} the largest rectangle contained in both the specified
|
||||||
* rectangle and in this rectangle
|
* rectangle and in this rectangle
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @param {Point} point The point to check for
|
* @param {Point} point the point to check for
|
||||||
*/
|
*/
|
||||||
contains: function(/* point */) {
|
contains: function(/* point */) {
|
||||||
// See CompoundPath#_contains() for the reason for !!
|
// See CompoundPath#_contains() for the reason for !!
|
||||||
|
@ -1731,7 +1731,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Item#guide} set to `true`
|
* Item#guide} set to `true`
|
||||||
* @option options.selected {Boolean} only hit selected items
|
* @option options.selected {Boolean} only hit selected items
|
||||||
*
|
*
|
||||||
* @param {Point} point The point where the hit-test should be performed
|
* @param {Point} point the point where the hit-test should be performed
|
||||||
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
* @param {Object} [options={ fill: true, stroke: true, segments: true,
|
||||||
* tolerance: 2 }]
|
* tolerance: 2 }]
|
||||||
* @return {HitResult} a hit result object that contains more information
|
* @return {HitResult} a hit result object that contains more information
|
||||||
|
@ -2157,9 +2157,11 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Hierarchy Operations} Adds the specified item as a child of
|
* {@grouptitle Hierarchy Operations}
|
||||||
* this item at the end of the its children list. You can use this function
|
*
|
||||||
* for groups, compound paths and layers.
|
* Adds the specified item as a child of this item at the end of the its
|
||||||
|
* children list. You can use this function for groups, compound paths and
|
||||||
|
* layers.
|
||||||
*
|
*
|
||||||
* @param {Item} item the item to be added as a child
|
* @param {Item} item the item to be added as a child
|
||||||
* @return {Item} the added item, or `null` if adding was not possible
|
* @return {Item} the added item, or `null` if adding was not possible
|
||||||
|
@ -2187,7 +2189,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* children list. You can use this function for groups, compound paths and
|
* children list. You can use this function for groups, compound paths and
|
||||||
* layers.
|
* layers.
|
||||||
*
|
*
|
||||||
* @param {Item[]} items The items to be added as children
|
* @param {Item[]} items the items to be added as children
|
||||||
* @return {Item[]} the added items, or `null` if adding was not possible
|
* @return {Item[]} the added items, or `null` if adding was not possible
|
||||||
*/
|
*/
|
||||||
addChildren: function(items, _preserve) {
|
addChildren: function(items, _preserve) {
|
||||||
|
@ -2200,7 +2202,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* groups, compound paths and layers.
|
* groups, compound paths and layers.
|
||||||
*
|
*
|
||||||
* @param {Number} index
|
* @param {Number} index
|
||||||
* @param {Item[]} items The items to be appended as children
|
* @param {Item[]} items the items to be appended as children
|
||||||
* @return {Item[]} the inserted items, or `null` if inserted was not
|
* @return {Item[]} the inserted items, or `null` if inserted was not
|
||||||
* possible
|
* possible
|
||||||
*/
|
*/
|
||||||
|
@ -2304,7 +2306,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* use this function for groups, compound paths and layers.
|
* use this function for groups, compound paths and layers.
|
||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Item} item The item to be appended as a child
|
* @param {Item} item the item to be appended as a child
|
||||||
* @deprecated use {@link #addChild(item)} instead.
|
* @deprecated use {@link #addChild(item)} instead.
|
||||||
*/
|
*/
|
||||||
appendTop: '#addChild',
|
appendTop: '#addChild',
|
||||||
|
@ -2314,7 +2316,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* the list of children and moving it below all other children. You can
|
* the list of children and moving it below all other children. You can
|
||||||
* use this function for groups, compound paths and layers.
|
* use this function for groups, compound paths and layers.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to be appended as a child
|
* @param {Item} item the item to be appended as a child
|
||||||
* @deprecated use {@link #insertChild(index, item)} instead.
|
* @deprecated use {@link #insertChild(index, item)} instead.
|
||||||
*/
|
*/
|
||||||
appendBottom: function(item) {
|
appendBottom: function(item) {
|
||||||
|
@ -2325,7 +2327,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Moves this item above the specified item.
|
* Moves this item above the specified item.
|
||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Item} item The item above which it should be moved
|
* @param {Item} item the item above which it should be moved
|
||||||
* @return {Boolean} {@true if it was moved}
|
* @return {Boolean} {@true if it was moved}
|
||||||
* @deprecated use {@link #insertAbove(item)} instead.
|
* @deprecated use {@link #insertAbove(item)} instead.
|
||||||
*/
|
*/
|
||||||
|
@ -2616,7 +2618,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Checks if this item is above the specified item in the stacking order
|
* Checks if this item is above the specified item in the stacking order
|
||||||
* of the project.
|
* of the project.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to check against
|
* @param {Item} item the item to check against
|
||||||
* @return {Boolean} {@true if it is above the specified item}
|
* @return {Boolean} {@true if it is above the specified item}
|
||||||
*/
|
*/
|
||||||
isAbove: function(item) {
|
isAbove: function(item) {
|
||||||
|
@ -2627,7 +2629,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* Checks if the item is below the specified item in the stacking order of
|
* Checks if the item is below the specified item in the stacking order of
|
||||||
* the project.
|
* the project.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to check against
|
* @param {Item} item the item to check against
|
||||||
* @return {Boolean} {@true if it is below the specified item}
|
* @return {Boolean} {@true if it is below the specified item}
|
||||||
*/
|
*/
|
||||||
isBelow: function(item) {
|
isBelow: function(item) {
|
||||||
|
@ -2637,7 +2639,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
/**
|
/**
|
||||||
* Checks whether the specified item is the parent of the item.
|
* Checks whether the specified item is the parent of the item.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to check against
|
* @param {Item} item the item to check against
|
||||||
* @return {Boolean} {@true if it is the parent of the item}
|
* @return {Boolean} {@true if it is the parent of the item}
|
||||||
*/
|
*/
|
||||||
isParent: function(item) {
|
isParent: function(item) {
|
||||||
|
@ -2647,7 +2649,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
/**
|
/**
|
||||||
* Checks whether the specified item is a child of the item.
|
* Checks whether the specified item is a child of the item.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to check against
|
* @param {Item} item the item to check against
|
||||||
* @return {Boolean} {@true it is a child of the item}
|
* @return {Boolean} {@true it is a child of the item}
|
||||||
*/
|
*/
|
||||||
isChild: function(item) {
|
isChild: function(item) {
|
||||||
|
@ -2657,7 +2659,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
/**
|
/**
|
||||||
* Checks if the item is contained within the specified item.
|
* Checks if the item is contained within the specified item.
|
||||||
*
|
*
|
||||||
* @param {Item} item The item to check against
|
* @param {Item} item the item to check against
|
||||||
* @return {Boolean} {@true if it is inside the specified item}
|
* @return {Boolean} {@true if it is inside the specified item}
|
||||||
*/
|
*/
|
||||||
isDescendant: function(item) {
|
isDescendant: function(item) {
|
||||||
|
@ -3148,7 +3150,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||||
* @param {Matrix} matrix the matrix by which the item shall be transformed
|
* @param {Matrix} matrix the matrix by which the item shall be transformed
|
||||||
*/
|
*/
|
||||||
// TODO: Implement flags:
|
// TODO: Implement flags:
|
||||||
// @param {String[]} flags Array of any of the following: 'objects',
|
// @param {String[]} flags array of any of the following: 'objects',
|
||||||
// 'children', 'fill-gradients', 'fill-patterns', 'stroke-patterns',
|
// 'children', 'fill-gradients', 'fill-patterns', 'stroke-patterns',
|
||||||
// 'lines'. Default: ['objects', 'children']
|
// 'lines'. Default: ['objects', 'children']
|
||||||
transform: function(matrix, _applyMatrix, _applyRecursively,
|
transform: function(matrix, _applyMatrix, _applyRecursively,
|
||||||
|
|
|
@ -470,16 +470,14 @@ PathItem.inject(new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private method to trace closed contours from a set of segments according
|
* Private method to trace closed paths from a list of segments, according
|
||||||
* to a set of constraints-winding contribution and a custom operator.
|
* to a the their winding number contribution and a custom operator.
|
||||||
*
|
*
|
||||||
* @param {Segment[]} segments Array of 'seed' segments for tracing closed
|
* @param {Segment[]} segments array of segments to trace closed paths
|
||||||
* contours
|
* @param {Function} operator the operator lookup table that receives as key
|
||||||
* @param {Function} the operator function that receives as argument the
|
* the winding number contribution of a curve and returns a boolean
|
||||||
* winding number contribution of a curve and returns a boolean value
|
* value indicating whether the curve should be included in result
|
||||||
* indicating whether the curve should be included in the final contour or
|
* @return {Path[]} the traced closed paths
|
||||||
* not
|
|
||||||
* @return {Path[]} the contours traced
|
|
||||||
*/
|
*/
|
||||||
function tracePaths(segments, operator, validOverlapsOnly) {
|
function tracePaths(segments, operator, validOverlapsOnly) {
|
||||||
var paths = [],
|
var paths = [],
|
||||||
|
|
|
@ -208,7 +208,7 @@ var Numerical = new function() {
|
||||||
* @param {Number[]} roots the array to store the roots in
|
* @param {Number[]} roots the array to store the roots in
|
||||||
* @param {Number} [min] the lower bound of the allowed roots
|
* @param {Number} [min] the lower bound of the allowed roots
|
||||||
* @param {Number} [max] the upper bound of the allowed roots
|
* @param {Number} [max] the upper bound of the allowed roots
|
||||||
* @return {Number} The number of real roots found, or -1 if there are
|
* @return {Number} the number of real roots found, or -1 if there are
|
||||||
* infinite solutions
|
* infinite solutions
|
||||||
*
|
*
|
||||||
* @author Harikrishnan Gopalakrishnan
|
* @author Harikrishnan Gopalakrishnan
|
||||||
|
|
|
@ -22,7 +22,7 @@ var UID = {
|
||||||
/**
|
/**
|
||||||
* Returns the next unique id.
|
* Returns the next unique id.
|
||||||
* @method get
|
* @method get
|
||||||
* @return {Number} The next unique id
|
* @return {Number} the next unique id
|
||||||
* @static
|
* @static
|
||||||
**/
|
**/
|
||||||
get: function(ctor) {
|
get: function(ctor) {
|
||||||
|
|
Loading…
Reference in a new issue