mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Documentation: capitalize basic types in @ tags.
This commit is contained in:
parent
2d5007dcd9
commit
1520cad144
18 changed files with 120 additions and 120 deletions
|
@ -90,7 +90,7 @@ var Line = this.Line = Base.extend({
|
|||
// DOCS: document Line#getSide(point)
|
||||
/**
|
||||
* @param {Point} point
|
||||
* @return {number}
|
||||
* @return {Number}
|
||||
*/
|
||||
getSide: function(point) {
|
||||
var v1 = this.vector,
|
||||
|
|
|
@ -28,12 +28,12 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* Creates a 2D affine transform.
|
||||
*
|
||||
* @constructs Matrix
|
||||
* @param {number} m00 The m00 coordinate of the transform.
|
||||
* @param {number} m10 The m10 coordinate of the transform.
|
||||
* @param {number} m01 The m01 coordinate of the transform.
|
||||
* @param {number} m11 The m11 coordinate of the transform.
|
||||
* @param {number} m02 The m02 coordinate of the transform.
|
||||
* @param {number} m12 The m12 coordinate of the transform.
|
||||
* @param {Number} m00 The m00 coordinate of the transform.
|
||||
* @param {Number} m10 The m10 coordinate of the transform.
|
||||
* @param {Number} m01 The m01 coordinate of the transform.
|
||||
* @param {Number} m11 The m11 coordinate of the transform.
|
||||
* @param {Number} m02 The m02 coordinate of the transform.
|
||||
* @param {Number} m12 The m12 coordinate of the transform.
|
||||
*
|
||||
* @class An affine transform performs a linear mapping from 2D coordinates
|
||||
* to other 2D coordinates that preserves the "straightness" and
|
||||
|
@ -88,12 +88,12 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Sets this transform to the matrix specified by the 6 values.
|
||||
*
|
||||
* @param {number} m00 The m00 coordinate of the transform.
|
||||
* @param {number} m10 The m10 coordinate of the transform.
|
||||
* @param {number} m01 The m01 coordinate of the transform.
|
||||
* @param {number} m11 The m11 coordinate of the transform.
|
||||
* @param {number} m02 The m02 coordinate of the transform.
|
||||
* @param {number} m12 The m12 coordinate of the transform.
|
||||
* @param {Number} m00 The m00 coordinate of the transform.
|
||||
* @param {Number} m10 The m10 coordinate of the transform.
|
||||
* @param {Number} m01 The m01 coordinate of the transform.
|
||||
* @param {Number} m11 The m11 coordinate of the transform.
|
||||
* @param {Number} m02 The m02 coordinate of the transform.
|
||||
* @param {Number} m12 The m12 coordinate of the transform.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
set: function(m00, m10, m01, m11, m02, m12) {
|
||||
|
@ -109,8 +109,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Concatentates this transform with a scaling transformation.
|
||||
*
|
||||
* @param {number} sx The x-axis scaling factor.
|
||||
* @param {number} sy The y-axis scaling factor.
|
||||
* @param {Number} sx The x-axis scaling factor.
|
||||
* @param {Number} sy The y-axis scaling factor.
|
||||
* @param {Point} center The optional center for the scaling transformation.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
|
@ -138,8 +138,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Concatentates this transform with a translate transformation.
|
||||
*
|
||||
* @param {number} dx The distance to translate in the x direction.
|
||||
* @param {number} dy The distance to translate in the y direction.
|
||||
* @param {Number} dx The distance to translate in the x direction.
|
||||
* @param {Number} dy The distance to translate in the y direction.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
translate: function(point) {
|
||||
|
@ -154,9 +154,9 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* Concatentates this transform with a rotation transformation around an
|
||||
* anchor point.
|
||||
*
|
||||
* @param {number} angle The angle of rotation measured in degrees.
|
||||
* @param {number} x The x coordinate of the anchor point.
|
||||
* @param {number} y The y coordinate of the anchor point.
|
||||
* @param {Number} angle The angle of rotation measured in degrees.
|
||||
* @param {Number} x The x coordinate of the anchor point.
|
||||
* @param {Number} y The y coordinate of the anchor point.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
rotate: function(angle, center) {
|
||||
|
@ -167,8 +167,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Concatentates this transform with a shear transformation.
|
||||
*
|
||||
* @param {number} shx The x shear factor.
|
||||
* @param {number} shy The y shear factor.
|
||||
* @param {Number} shx The x shear factor.
|
||||
* @param {Number} shy The y shear factor.
|
||||
* @param {Point} center The optional center for the shear transformation.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
|
@ -194,7 +194,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of this transform.
|
||||
* @return {String} A string representation of this transform.
|
||||
*/
|
||||
toString: function() {
|
||||
var format = Base.formatNumber;
|
||||
|
@ -205,32 +205,32 @@ var Matrix = this.Matrix = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {number} The scaling factor in the x-direction (m00).
|
||||
* @return {Number} The scaling factor in the x-direction (m00).
|
||||
*/
|
||||
// scaleX
|
||||
|
||||
/**
|
||||
* @return {number} The scaling factor in the y-direction (m11).
|
||||
* @return {Number} The scaling factor in the y-direction (m11).
|
||||
*/
|
||||
// scaleY
|
||||
|
||||
/**
|
||||
* @return {number} The translation in the x-direction (m02).
|
||||
* @return {Number} The translation in the x-direction (m02).
|
||||
*/
|
||||
// translateX
|
||||
|
||||
/**
|
||||
* @return {number} The translation in the y-direction (m12).
|
||||
* @return {Number} The translation in the y-direction (m12).
|
||||
*/
|
||||
// translateY
|
||||
|
||||
/**
|
||||
* @return {number} The shear factor in the x-direction (m01).
|
||||
* @return {Number} The shear factor in the x-direction (m01).
|
||||
*/
|
||||
// shearX
|
||||
|
||||
/**
|
||||
* @return {number} The shear factor in the y-direction (m10).
|
||||
* @return {Number} The shear factor in the y-direction (m10).
|
||||
*/
|
||||
// shearY
|
||||
|
||||
|
@ -288,12 +288,12 @@ var Matrix = this.Matrix = Base.extend({
|
|||
*
|
||||
* @param {Array} src The array containing the source points
|
||||
* as x, y value pairs.
|
||||
* @param {number} srcOff The offset to the first point to be transformed.
|
||||
* @param {Number} srcOff The offset to the first point to be transformed.
|
||||
* @param {Array} dst The array into which to store the transformed
|
||||
* point pairs.
|
||||
* @param {number} dstOff The offset of the location of the first
|
||||
* @param {Number} dstOff The offset of the location of the first
|
||||
* transformed point in the destination array.
|
||||
* @param {number} numPts The number of points to tranform.
|
||||
* @param {Number} numPts The number of points to tranform.
|
||||
*/
|
||||
transform: function(/* point | */ src, srcOff, dst, dstOff, numPts) {
|
||||
return arguments.length < 5
|
||||
|
@ -361,7 +361,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {number} The determinant of this transform.
|
||||
* @return {Number} The determinant of this transform.
|
||||
*/
|
||||
getDeterminant: function() {
|
||||
return this._m00 * this._m11 - this._m01 * this._m10;
|
||||
|
@ -423,8 +423,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Sets this transform to a scaling transformation.
|
||||
*
|
||||
* @param {number} sx The x-axis scaling factor.
|
||||
* @param {number} sy The y-axis scaling factor.
|
||||
* @param {Number} sx The x-axis scaling factor.
|
||||
* @param {Number} sy The y-axis scaling factor.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
setToScale: function(sx, sy) {
|
||||
|
@ -434,8 +434,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Sets this transform to a translation transformation.
|
||||
*
|
||||
* @param {number} dx The distance to translate in the x direction.
|
||||
* @param {number} dy The distance to translate in the y direction.
|
||||
* @param {Number} dx The distance to translate in the x direction.
|
||||
* @param {Number} dy The distance to translate in the y direction.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
setToTranslation: function(delta) {
|
||||
|
@ -446,8 +446,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Sets this transform to a shearing transformation.
|
||||
*
|
||||
* @param {number} shx The x-axis shear factor.
|
||||
* @param {number} shy The y-axis shear factor.
|
||||
* @param {Number} shx The x-axis shear factor.
|
||||
* @param {Number} shy The y-axis shear factor.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
setToShear: function(shx, shy) {
|
||||
|
@ -457,9 +457,9 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Sets this transform to a rotation transformation.
|
||||
*
|
||||
* @param {number} angle The angle of rotation measured in degrees.
|
||||
* @param {number} x The x coordinate of the anchor point.
|
||||
* @param {number} y The y coordinate of the anchor point.
|
||||
* @param {Number} angle The angle of rotation measured in degrees.
|
||||
* @param {Number} x The x coordinate of the anchor point.
|
||||
* @param {Number} y The y coordinate of the anchor point.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
setToRotation: function(angle, center) {
|
||||
|
@ -496,8 +496,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Creates a transform representing a scaling transformation.
|
||||
*
|
||||
* @param {number} sx The x-axis scaling factor.
|
||||
* @param {number} sy The y-axis scaling factor.
|
||||
* @param {Number} sx The x-axis scaling factor.
|
||||
* @param {Number} sy The y-axis scaling factor.
|
||||
* @return {Matrix} A transform representing a scaling
|
||||
* transformation.
|
||||
*/
|
||||
|
@ -509,8 +509,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Creates a transform representing a translation transformation.
|
||||
*
|
||||
* @param {number} dx The distance to translate in the x direction.
|
||||
* @param {number} dy The distance to translate in the y direction.
|
||||
* @param {Number} dx The distance to translate in the x direction.
|
||||
* @param {Number} dy The distance to translate in the y direction.
|
||||
* @return {Matrix} A transform representing a translation
|
||||
* transformation.
|
||||
*/
|
||||
|
@ -522,8 +522,8 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Creates a transform representing a shearing transformation.
|
||||
*
|
||||
* @param {number} shx The x-axis shear factor.
|
||||
* @param {number} shy The y-axis shear factor.
|
||||
* @param {Number} shx The x-axis shear factor.
|
||||
* @param {Number} shy The y-axis shear factor.
|
||||
* @return {Matrix} A transform representing a shearing transformation.
|
||||
*/
|
||||
getShearInstance: function(shx, shy, center) {
|
||||
|
@ -534,9 +534,9 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* Creates a transform representing a rotation transformation.
|
||||
*
|
||||
* @param {number} angle The angle of rotation measured in degrees.
|
||||
* @param {number} x The x coordinate of the anchor point.
|
||||
* @param {number} y The y coordinate of the anchor point.
|
||||
* @param {Number} angle The angle of rotation measured in degrees.
|
||||
* @param {Number} x The x coordinate of the anchor point.
|
||||
* @param {Number} y The y coordinate of the anchor point.
|
||||
* @return {Matrix} A transform representing a rotation transformation.
|
||||
*/
|
||||
getRotateInstance: function(angle, center) {
|
||||
|
|
|
@ -24,8 +24,8 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point
|
||||
* @constructor
|
||||
* @param {number} x the x coordinate
|
||||
* @param {number} y the y coordinate
|
||||
* @param {Number} x the x coordinate
|
||||
* @param {Number} y the y coordinate
|
||||
*
|
||||
* @class The Point object represents a point in the two dimensional space
|
||||
* of the Paper.js project. It is also used to represent two dimensional
|
||||
|
@ -107,7 +107,7 @@ var Point = this.Point = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the point.
|
||||
* @return {String} A string representation of the point.
|
||||
*/
|
||||
toString: function() {
|
||||
var format = Base.formatNumber;
|
||||
|
@ -126,7 +126,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point#add^2
|
||||
* @function
|
||||
* @param {number} number the number to add
|
||||
* @param {Number} number the number to add
|
||||
* @return {Point} the addition of the point and the value as a new point
|
||||
*/
|
||||
/**
|
||||
|
@ -162,7 +162,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point#subtract^2
|
||||
* @function
|
||||
* @param {number} number the number to subtract
|
||||
* @param {Number} number the number to subtract
|
||||
* @return {Point} the subtraction of the point and the value as a new point
|
||||
*/
|
||||
/**
|
||||
|
@ -198,7 +198,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point#multiply^2
|
||||
* @function
|
||||
* @param {number} number the number to multiply by
|
||||
* @param {Number} number the number to multiply by
|
||||
* @return {Point} the multiplication of the point and the value as a new point
|
||||
*/
|
||||
/**
|
||||
|
@ -234,7 +234,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point#divide^2
|
||||
* @function
|
||||
* @param {number} number the number to divide by
|
||||
* @param {Number} number the number to divide by
|
||||
* @return {Point} the division of the point and the value as a new point
|
||||
*/
|
||||
/**
|
||||
|
@ -268,7 +268,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @name Point#modulo^2
|
||||
* @function
|
||||
* @param {number} value
|
||||
* @param {Number} value
|
||||
* @return {Point} the integer remainders of dividing the point by the value
|
||||
* as a new point
|
||||
*/
|
||||
|
@ -312,7 +312,7 @@ var Point = this.Point = Base.extend({
|
|||
* Returns the distance between the point and another point.
|
||||
*
|
||||
* @param {Point} point
|
||||
* @return {number}
|
||||
* @return {Number}
|
||||
*/
|
||||
getDistance: function(point) {
|
||||
point = Point.read(arguments);
|
||||
|
@ -359,7 +359,7 @@ var Point = this.Point = Base.extend({
|
|||
|
||||
// DOCS: Point#length
|
||||
/**
|
||||
* @param {number} length
|
||||
* @param {Number} length
|
||||
* @return {Point}
|
||||
*/
|
||||
normalize: function(length) {
|
||||
|
@ -381,7 +381,7 @@ var Point = this.Point = Base.extend({
|
|||
* @name Point#getAngle
|
||||
* @function
|
||||
* @param {Point} point
|
||||
* @return {number} the angle in degrees
|
||||
* @return {Number} the angle in degrees
|
||||
*/
|
||||
/**
|
||||
* The vector's angle in degrees, measured from the x-axis to the vector.
|
||||
|
@ -418,7 +418,7 @@ var Point = this.Point = Base.extend({
|
|||
* @name Point#getAngleInRadians
|
||||
* @function
|
||||
* @param {Point} point
|
||||
* @return {number} the angle in radians
|
||||
* @return {Number} the angle in radians
|
||||
*/
|
||||
/**
|
||||
* The vector's angle in radians, measured from the x-axis to the vector.
|
||||
|
@ -452,7 +452,7 @@ var Point = this.Point = Base.extend({
|
|||
|
||||
// DOCS: Point#getQuadrant
|
||||
/**
|
||||
* @return {number}
|
||||
* @return {Number}
|
||||
*/
|
||||
getQuadrant: function() {
|
||||
return this.x >= 0 ? this.y >= 0 ? 1 : 4 : this.y >= 0 ? 2 : 3;
|
||||
|
@ -466,7 +466,7 @@ var Point = this.Point = Base.extend({
|
|||
* {@link #angle} property.
|
||||
*
|
||||
* @param {Point} point
|
||||
* @return {number} the angle between the two vectors
|
||||
* @return {Number} the angle between the two vectors
|
||||
*/
|
||||
getDirectedAngle: function(point) {
|
||||
point = Point.read(arguments);
|
||||
|
@ -481,7 +481,7 @@ var Point = this.Point = Base.extend({
|
|||
* Read more about angle units and orientation in the description of the
|
||||
* {@link #angle} property.
|
||||
*
|
||||
* @param {number} angle the rotation angle
|
||||
* @param {Number} angle the rotation angle
|
||||
* @param {Point} center the center point of the rotation
|
||||
* @returns {Point} the rotated point
|
||||
*/
|
||||
|
@ -531,7 +531,7 @@ var Point = this.Point = Base.extend({
|
|||
* Checks if the point is within a given distance of another point.
|
||||
*
|
||||
* @param {Point} point the point to check against
|
||||
* @param {number} tolerance the maximum distance allowed
|
||||
* @param {Number} tolerance the maximum distance allowed
|
||||
* @returns {boolean} {@true if it is within the given distance}
|
||||
*/
|
||||
isClose: function(point, tolerance) {
|
||||
|
@ -584,7 +584,7 @@ var Point = this.Point = Base.extend({
|
|||
* Returns the dot product of the point and another point.
|
||||
*
|
||||
* @param {Point} point
|
||||
* @returns {number} the dot product of the two points
|
||||
* @returns {Number} the dot product of the two points
|
||||
*/
|
||||
dot: function(point) {
|
||||
point = Point.read(arguments);
|
||||
|
@ -595,7 +595,7 @@ var Point = this.Point = Base.extend({
|
|||
* Returns the cross product of the point and another point.
|
||||
*
|
||||
* @param {Point} point
|
||||
* @returns {number} the cross product of the two points
|
||||
* @returns {Number} the cross product of the two points
|
||||
*/
|
||||
cross: function(point) {
|
||||
point = Point.read(arguments);
|
||||
|
|
|
@ -344,7 +344,7 @@ var Rectangle = this.Rectangle = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of this rectangle.
|
||||
* @return {String} A string representation of this rectangle.
|
||||
*/
|
||||
toString: function() {
|
||||
var format = Base.formatNumber;
|
||||
|
|
|
@ -23,8 +23,8 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size
|
||||
* @constructor
|
||||
* @param {number} width the width
|
||||
* @param {number} height the height
|
||||
* @param {Number} width the width
|
||||
* @param {Number} height the height
|
||||
*
|
||||
* @class The Size object represents the size of something.
|
||||
*
|
||||
|
@ -63,7 +63,7 @@ var Size = this.Size = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the size.
|
||||
* @return {String} A string representation of the size.
|
||||
*/
|
||||
toString: function() {
|
||||
var format = Base.formatNumber;
|
||||
|
@ -102,7 +102,7 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size#add^2
|
||||
* @function
|
||||
* @param {number} number the number to add
|
||||
* @param {Number} number the number to add
|
||||
* @return {Size} the addition of the size and the value as a new size
|
||||
*/
|
||||
/**
|
||||
|
@ -137,7 +137,7 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size#subtract^2
|
||||
* @function
|
||||
* @param {number} number the number to subtract
|
||||
* @param {Number} number the number to subtract
|
||||
* @return {Size} the subtraction of the size and the value as a new size
|
||||
*/
|
||||
/**
|
||||
|
@ -171,7 +171,7 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size#multiply^2
|
||||
* @function
|
||||
* @param {number} number the number to multiply by
|
||||
* @param {Number} number the number to multiply by
|
||||
* @return {Size} the multiplication of the size and the value as a new size
|
||||
*/
|
||||
/**
|
||||
|
@ -205,7 +205,7 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size#divide^2
|
||||
* @function
|
||||
* @param {number} number the number to divide by
|
||||
* @param {Number} number the number to divide by
|
||||
* @return {Size} the division of the size and the value as a new size
|
||||
*/
|
||||
/**
|
||||
|
@ -238,7 +238,7 @@ var Size = this.Size = Base.extend({
|
|||
*
|
||||
* @name Size#modulo^2
|
||||
* @function
|
||||
* @param {number} value
|
||||
* @param {Number} value
|
||||
* @return {Size} the integer remainders of dividing the size by the value
|
||||
* as a new size
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ var Gradient = this.Gradient = Base.extend({
|
|||
* Creates a gradient object
|
||||
*
|
||||
* @param {GradientStop[]} stops
|
||||
* @param {string} [type='linear'] 'linear' or 'radial'
|
||||
* @param {String} [type='linear'] 'linear' or 'radial'
|
||||
* @constructs Gradient
|
||||
*
|
||||
* @class The Gradient object.
|
||||
|
|
|
@ -24,7 +24,7 @@ var GradientStop = this.GradientStop = Base.extend({
|
|||
* Creates a GradientStop object.
|
||||
*
|
||||
* @param {Color} [color=new RGBColor(0, 0, 0)] the color of the stop
|
||||
* @param {number} [rampPoint=0] the position of the stop on the gradient
|
||||
* @param {Number} [rampPoint=0] the position of the stop on the gradient
|
||||
* ramp {@default 0}
|
||||
* @constructs GradientStop
|
||||
*
|
||||
|
|
|
@ -33,7 +33,7 @@ var Group = this.Group = Item.extend({
|
|||
* var circle = new Path.Circle(new Point(10, 10), 100);
|
||||
* var circleGroup = new Group([circle]);
|
||||
*
|
||||
* @param {array} [children] An optional array of children that will be
|
||||
* @param {Array} [children] An optional array of children that will be
|
||||
* added to the newly created group.
|
||||
*
|
||||
* @class A Group is a collection of items. When you transform a Group, its
|
||||
|
|
|
@ -550,7 +550,7 @@ var Item = this.Item = Base.extend({
|
|||
* Rasterizes the item into a newly created Raster object. The item itself
|
||||
* is not removed after rasterization.
|
||||
*
|
||||
* @param {number} [resolution=72] the resolution of the raster in dpi
|
||||
* @param {Number} [resolution=72] the resolution of the raster in dpi
|
||||
* @return {Raster} the newly created raster item
|
||||
*/
|
||||
rasterize: function(resolution) {
|
||||
|
@ -853,7 +853,7 @@ var Item = this.Item = Base.extend({
|
|||
*
|
||||
* @property
|
||||
* @name Item#dashArray
|
||||
* @type array
|
||||
* @type Array
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -907,7 +907,7 @@ var Item = this.Item = Base.extend({
|
|||
*
|
||||
* @name Item#scale^1
|
||||
* @function
|
||||
* @param {number} scale the scale factor
|
||||
* @param {Number} scale the scale factor
|
||||
* @param {Point} [center=the center point of the item]
|
||||
*/
|
||||
/**
|
||||
|
@ -931,8 +931,8 @@ var Item = this.Item = Base.extend({
|
|||
* // Scale the path 200% horizontally from its bottom left corner
|
||||
* circle.scale(1, 2, circle.bounds.bottomLeft);
|
||||
*
|
||||
* @param {number} sx the horizontal scale factor
|
||||
* @param {number} sy the vertical scale factor
|
||||
* @param {Number} sx the horizontal scale factor
|
||||
* @param {Number} sy the vertical scale factor
|
||||
* @param {Point} [center=the center point of the item]
|
||||
*/
|
||||
scale: function(sx, sy /* | scale */, center) {
|
||||
|
@ -962,7 +962,7 @@ var Item = this.Item = Base.extend({
|
|||
* more about angle units and orientation in the description of the
|
||||
* {@link Point#angle} property.
|
||||
*
|
||||
* @param {number} angle the rotation angle
|
||||
* @param {Number} angle the rotation angle
|
||||
* @param {Point} [center=the center point of the item]
|
||||
* @see Matrix#rotate
|
||||
*/
|
||||
|
@ -974,8 +974,8 @@ var Item = this.Item = Base.extend({
|
|||
/**
|
||||
* Shears the item with a given amount around its center point.
|
||||
*
|
||||
* @param {number} shx
|
||||
* @param {number} shy
|
||||
* @param {Number} shx
|
||||
* @param {Number} shy
|
||||
* @param {Point} [center=the center point of the item]
|
||||
* @see Matrix#shear
|
||||
*/
|
||||
|
@ -994,7 +994,7 @@ var Item = this.Item = Base.extend({
|
|||
* Transform the item.
|
||||
*
|
||||
* @param {Matrix} matrix
|
||||
* @param {array} flags Array of any of the following: 'objects', 'children',
|
||||
* @param {Array} flags Array of any of the following: 'objects', 'children',
|
||||
* 'fill-gradients', 'fill-patterns', 'stroke-patterns', 'lines'.
|
||||
* Default: ['objects', 'children']
|
||||
*/
|
||||
|
|
|
@ -29,7 +29,7 @@ var Layer = this.Layer = Group.extend({
|
|||
* var layer = new Layer();
|
||||
* layer.name = 'the new layer';
|
||||
*
|
||||
* @param {array} [children] An optional array of items that will be
|
||||
* @param {Array} [children] An optional array of items that will be
|
||||
* added to the newly created layer.
|
||||
*
|
||||
* @class The Layer item represents a layer in a Paper.js project.
|
||||
|
|
|
@ -230,7 +230,7 @@ var PathStyle = this.PathStyle = Base.extend(new function() {
|
|||
*
|
||||
* @property
|
||||
* @name PathStyle#dashArray
|
||||
* @type array
|
||||
* @type Array
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -244,8 +244,8 @@ var Curve = this.Curve = Base.extend({
|
|||
// PORT: Add support for start parameter to Sg
|
||||
// DOCS: document Curve#getParameter(length, start)
|
||||
/**
|
||||
* @param {number} length
|
||||
* @param {number} [start]
|
||||
* @param {Number} length
|
||||
* @param {Number} [start]
|
||||
* @return {boolean} {@true the curve is linear}
|
||||
*/
|
||||
getParameter: function(length, start) {
|
||||
|
@ -295,7 +295,7 @@ var Curve = this.Curve = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the curve.
|
||||
* @return {String} A string representation of the curve.
|
||||
*/
|
||||
toString: function() {
|
||||
var parts = [ 'point1: ' + this._segment1._point ];
|
||||
|
@ -416,7 +416,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* Returns the point on the curve at the specified position.
|
||||
*
|
||||
* @param {number} parameter the position at which to find the point as
|
||||
* @param {Number} parameter the position at which to find the point as
|
||||
* a value between 0 and 1.
|
||||
* @return {Point}
|
||||
*/
|
||||
|
@ -427,7 +427,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* Returns the tangent point on the curve at the specified position.
|
||||
*
|
||||
* @param {number} parameter the position at which to find the tangent
|
||||
* @param {Number} parameter the position at which to find the tangent
|
||||
* point as a value between 0 and 1.
|
||||
*/
|
||||
getTangent: function(parameter) {
|
||||
|
@ -437,7 +437,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* Returns the normal point on the curve at the specified position.
|
||||
*
|
||||
* @param {number} parameter the position at which to find the normal
|
||||
* @param {Number} parameter the position at which to find the normal
|
||||
* point as a value between 0 and 1.
|
||||
*/
|
||||
getNormal: function(parameter) {
|
||||
|
|
|
@ -31,7 +31,7 @@ CurveLocation = Base.extend({
|
|||
* @name CurveLocation
|
||||
* @constructor
|
||||
* @param {Curve} curve
|
||||
* @param {number} parameter
|
||||
* @param {Number} parameter
|
||||
* @param {Point} point
|
||||
*
|
||||
* @class CurveLocation objects describe a location on {@link Curve}
|
||||
|
@ -182,7 +182,7 @@ CurveLocation = Base.extend({
|
|||
},
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the curve location.
|
||||
* @return {String} A string representation of the curve location.
|
||||
*/
|
||||
toString: function() {
|
||||
var parts = [],
|
||||
|
|
|
@ -181,7 +181,7 @@ Path.inject({ statics: new function() {
|
|||
* var path = new Path.Circle(new Point(100, 100), 50);
|
||||
*
|
||||
* @param {Point} center the center point of the circle
|
||||
* @param {number} radius the radius of the circle
|
||||
* @param {Number} radius the radius of the circle
|
||||
* @return {Path} the newly created path
|
||||
*/
|
||||
Circle: function(center, radius) {
|
||||
|
@ -225,8 +225,8 @@ Path.inject({ statics: new function() {
|
|||
* var decahedron = new Path.RegularPolygon(new Point(200, 100), 10, 50);
|
||||
*
|
||||
* @param {Point} center the center point of the polygon
|
||||
* @param {number} numSides the number of sides of the polygon
|
||||
* @param {number} radius the radius of the polygon
|
||||
* @param {Number} numSides the number of sides of the polygon
|
||||
* @param {Number} radius the radius of the polygon
|
||||
* @return {Path} the newly created path
|
||||
*/
|
||||
RegularPolygon: function(center, numSides, radius) {
|
||||
|
@ -261,9 +261,9 @@ Path.inject({ statics: new function() {
|
|||
* var path = new Path.Star(center, points, innerRadius, outerRadius);
|
||||
*
|
||||
* @param {Point} center the center point of the star
|
||||
* @param {number} numPoints the number of points of the star
|
||||
* @param {number} radius1
|
||||
* @param {number} radius2
|
||||
* @param {Number} numPoints the number of points of the star
|
||||
* @param {Number} radius1
|
||||
* @param {Number} radius2
|
||||
* @return {Path} the newly created path
|
||||
*/
|
||||
Star: function(center, numPoints, radius1, radius2) {
|
||||
|
|
|
@ -297,7 +297,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* Inserts one or more segments at a given index in the list of this path's
|
||||
* segments.
|
||||
*
|
||||
* @param {number} index the index at which to insert the segment.
|
||||
* @param {Number} index the index at which to insert the segment.
|
||||
* @param {Segment|Point} segment the segment or point to be inserted.
|
||||
* @return {Segment} the added segment. This is not necessarily the same
|
||||
* object, e.g. if the segment to be added already belongs to another path.
|
||||
|
@ -337,7 +337,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* Removes the segment at the specified index of the path's
|
||||
* {@link #segments} array.
|
||||
*
|
||||
* @param {number} index the index of the segment to be removed
|
||||
* @param {Number} index the index of the segment to be removed
|
||||
* @return {Segment} the removed segment
|
||||
*/
|
||||
removeSegment: function(index) {
|
||||
|
@ -350,9 +350,9 @@ var Path = this.Path = PathItem.extend({
|
|||
* Removes the segments from the specified 'from' index to the specified
|
||||
* 'to' index from the path's {@link #segments} array.
|
||||
*
|
||||
* @param {number} from
|
||||
* @param {number} to
|
||||
* @return {array} an array containing the removed segments.
|
||||
* @param {Number} from
|
||||
* @param {Number} to
|
||||
* @return {Array} an array containing the removed segments.
|
||||
*/
|
||||
removeSegments: function(from, to) {
|
||||
from = from || 0;
|
||||
|
@ -572,7 +572,7 @@ var Path = this.Path = PathItem.extend({
|
|||
// PORT: Rename functions and add new isParameter argument in Sg
|
||||
// DOCS: document Path#getLocationAt
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @param {Number} offset
|
||||
* @param {boolean} [isParameter=false]
|
||||
*/
|
||||
getLocationAt: function(offset, isParameter) {
|
||||
|
@ -605,7 +605,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* Get the point of the path at the given offset.
|
||||
*
|
||||
* @param {number} offset
|
||||
* @param {Number} offset
|
||||
* @param {boolean} [isParameter=false]
|
||||
* @return {Point} the point at the given offset
|
||||
*/
|
||||
|
@ -618,7 +618,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* Get the tangent to the path at the given offset as a vector
|
||||
* point.
|
||||
*
|
||||
* @param {number} offset
|
||||
* @param {Number} offset
|
||||
* @param {boolean} [isParameter=false]
|
||||
* @return {Point} the tangent vector at the given offset
|
||||
*/
|
||||
|
@ -630,7 +630,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* Get the normal to the path at the given offset as a vector point.
|
||||
*
|
||||
* @param {number} offset
|
||||
* @param {Number} offset
|
||||
* @param {boolean} [isParameter=false]
|
||||
* @return {Point} the normal vector at the given offset
|
||||
*/
|
||||
|
@ -996,7 +996,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* @param {Point} through
|
||||
* @param {Point} to
|
||||
* @param {number} [parameter=0.5]
|
||||
* @param {Number} [parameter=0.5]
|
||||
*/
|
||||
curveTo: function(through, to, parameter) {
|
||||
through = Point.read(arguments, 0, 1);
|
||||
|
@ -1116,7 +1116,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* @param {Point} throughVector
|
||||
* @param {Point} toVector
|
||||
* @param {number} [parameter=0.5]
|
||||
* @param {Number} [parameter=0.5]
|
||||
*/
|
||||
curveBy: function(throughVector, toVector, parameter) {
|
||||
throughVector = Point.read(throughVector);
|
||||
|
|
|
@ -194,7 +194,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
// }
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the tool event.
|
||||
* @return {String} A string representation of the tool event.
|
||||
*/
|
||||
toString: function() {
|
||||
return '{ type: ' + this.type
|
||||
|
|
|
@ -145,7 +145,7 @@ var Key = this.Key = new function() {
|
|||
* }
|
||||
* }
|
||||
*
|
||||
* @param {string} key One of: 'backspace', 'enter', 'shift', 'control',
|
||||
* @param {String} key One of: 'backspace', 'enter', 'shift', 'control',
|
||||
* 'option', 'pause', 'caps-lock', 'escape', 'space', 'end', 'home',
|
||||
* 'left', 'up', 'right', 'down', 'delete', 'command'
|
||||
* @return {boolean} {@true if the key is pressed}
|
||||
|
|
|
@ -58,7 +58,7 @@ var KeyEvent = this.KeyEvent = Event.extend(new function() {
|
|||
*/
|
||||
|
||||
/**
|
||||
* @return {string} A string representation of the key event.
|
||||
* @return {String} A string representation of the key event.
|
||||
*/
|
||||
toString: function() {
|
||||
return '{ type: ' + this.type
|
||||
|
|
Loading…
Reference in a new issue