Whitespace. Removed all trailing whitespace from .js files

This commit is contained in:
Richard D. Worth 2011-06-30 06:01:51 -04:00
parent cb0eab92b9
commit ac39873693
50 changed files with 1279 additions and 1279 deletions
src/basic

View file

@ -1,16 +1,16 @@
/*
* Paper.js
*
*
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
* based on Scriptographer.org and designed to be largely API compatible.
* http://paperjs.org/
* http://scriptographer.org/
*
*
* Distributed under the MIT license. See LICENSE file for details.
*
*
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
* http://lehni.org/ & http://jonathanpuckey.com/
*
*
* All rights reserved.
*/
@ -21,11 +21,11 @@
/**
* @name Matrix
*
*
* @class An affine transform performs a linear mapping from 2D coordinates
* to other 2D coordinates that preserves the "straightness" and
* "parallelness" of lines.
*
*
* Such a coordinate transformation can be represented by a 3 row by 3
* column matrix with an implied last row of [ 0 0 1 ]. This matrix
* transforms source coordinates (x,y) into destination coordinates (x',y')
@ -36,7 +36,7 @@
* [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
* [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
* </pre>
*
*
* This class is optimized for speed and minimizes calculations based on its
* knowledge of the underlying matrix (as opposed to say simply performing
* matrix multiplication).
@ -44,7 +44,7 @@
var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Creates a 2D affine 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.
@ -64,7 +64,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
this.set.apply(this, m00);
} else {
ok = false;
}
}
} else if (arguments.length > 0) {
ok = false;
} else {
@ -85,7 +85,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* 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.
@ -106,7 +106,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatentates this transform with a scaling transformation.
*
*
* @name Matrix#scale
* @function
* @param {Number} scale The scaling factor.
@ -116,7 +116,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
*/
/**
* Concatentates this transform with a scaling transformation.
*
*
* @name Matrix#scale
* @function
* @param {Number} sx The x-axis scaling factor.
@ -148,7 +148,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatentates this transform with a translate transformation.
*
*
* @name Matrix#translate
* @function
* @param {Point} point The vector to translate by.
@ -156,7 +156,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
*/
/**
* Concatentates this transform with a translate transformation.
*
*
* @name Matrix#translate
* @function
* @param {Number} dx The distance to translate in the x direction.
@ -174,7 +174,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatentates this transform with a rotation transformation around an
* anchor point.
*
*
* @name Matrix#rotate
* @function
* @param {Number} angle The angle of rotation measured in degrees.
@ -184,7 +184,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatentates this transform with a rotation transformation around an
* anchor point.
*
*
* @name Matrix#rotate
* @function
* @param {Number} angle The angle of rotation measured in degrees.
@ -199,7 +199,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatentates this transform with a shear transformation.
*
*
* @name Matrix#shear
* @function
* @param {Point} point The shear factor in x and y direction.
@ -208,7 +208,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
*/
/**
* Concatentates this transform with a shear transformation.
*
*
* @name Matrix#shear
* @function
* @param {Number} shx The x shear factor.
@ -247,7 +247,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
+ [format(this._m10), format(this._m11),
format(this._m12)].join(', ') + ']]';
},
/**
* @return {Number} The scaling factor in the x-direction (m00).
*/
@ -280,7 +280,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Concatenates an affine transform to this transform.
*
*
* @param {Matrix} mx The transform to concatenate.
* @return {Matrix} This affine transform.
*/
@ -301,7 +301,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Pre-concatenates an affine transform to this transform.
*
*
* @param {Matrix} mx The transform to preconcatenate.
* @return {Matrix} This affine transform.
*/
@ -327,9 +327,9 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
* Transforms a point or an array of coordinates by this matrix and returns
* the result. If an array is transformed, the the result is stored into a
* destination array.
*
*
* @param {Point} point The point to be transformed.
*
*
* @param {Number[]} src The array containing the source points
* as x, y value pairs.
* @param {Number} srcOff The offset to the first point to be transformed.
@ -347,7 +347,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
},
/**
* A faster version of transform that only takes one point and does not
* A faster version of transform that only takes one point and does not
* attempt to convert it.
*/
_transformPoint: function(point, dest, dontNotify) {
@ -445,7 +445,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Returns whether the transform is invertible. A transform is not
* invertible if the determinant is 0 or any value is non-finite or NaN.
*
*
* @return {Boolean} Whether the transform is invertible.
*/
isInvertible: function() {
@ -457,7 +457,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Checks whether the matrix is singular or not. Singular matrices cannot be
* inverted.
*
*
* @return {Boolean} Whether the matrix is singular.
*/
isSingular: function() {
@ -489,7 +489,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Sets this transform to a scaling transformation.
*
*
* @param {Number} sx The x-axis scaling factor.
* @param {Number} sy The y-axis scaling factor.
* @return {Matrix} This affine transform.
@ -500,7 +500,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* 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.
* @return {Matrix} This affine transform.
@ -512,7 +512,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Sets this transform to a shearing transformation.
*
*
* @param {Number} shx The x-axis shear factor.
* @param {Number} shy The y-axis shear factor.
* @return {Matrix} This affine transform.
@ -523,7 +523,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* 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.
@ -543,7 +543,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Applies this matrix to the specified Canvas Context.
*
*
* @param {CanvasRenderingContext2D} ctx
* @param {Boolean} [reset=false]
*/
@ -563,7 +563,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Creates a transform representing a scaling transformation.
*
*
* @param {Number} sx The x-axis scaling factor.
* @param {Number} sy The y-axis scaling factor.
* @return {Matrix} A transform representing a scaling
@ -576,7 +576,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* 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.
* @return {Matrix} A transform representing a translation
@ -589,7 +589,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* Creates a transform representing a shearing transformation.
*
*
* @param {Number} shx The x-axis shear factor.
* @param {Number} shy The y-axis shear factor.
* @return {Matrix} A transform representing a shearing transformation.
@ -601,7 +601,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
/**
* 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.