mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 00:39:57 -04:00
Clean up white spaces in comments.
This commit is contained in:
parent
a7d22b2165
commit
ffa79f4fd1
28 changed files with 162 additions and 157 deletions
lib
src
basic
color
core
item
path
project
text
tool
2
lib/bootstrap.js
vendored
2
lib/bootstrap.js
vendored
|
@ -398,7 +398,7 @@ var Base = new function() { // Bootstrap scope
|
|||
|
||||
/**
|
||||
* A special constant, to be thrown by closures passed to each()
|
||||
*
|
||||
*
|
||||
* $continue / Base.next is not implemented, as the same
|
||||
* functionality can achieved by using return in the closure.
|
||||
* In prototype, the implementation of $continue also leads to a
|
||||
|
|
|
@ -49,21 +49,21 @@ var Line = this.Line = Base.extend({
|
|||
|
||||
/**
|
||||
* The starting point of the line
|
||||
*
|
||||
*
|
||||
* @name Line#point
|
||||
* @type Point
|
||||
*/
|
||||
|
||||
/**
|
||||
* The vector of the line
|
||||
*
|
||||
*
|
||||
* @name Line#vector
|
||||
* @type Point
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specifies whether the line extends infinitely
|
||||
*
|
||||
*
|
||||
* @name Line#infinite
|
||||
* @type Boolean
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ 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.
|
||||
|
@ -38,7 +38,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* @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')
|
||||
|
@ -49,7 +49,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* [ 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).
|
||||
|
@ -87,7 +87,7 @@ 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.
|
||||
|
@ -108,7 +108,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
|
||||
/**
|
||||
* Concatentates this transform with a scaling transformation.
|
||||
*
|
||||
*
|
||||
* @name Matrix#scale
|
||||
* @function
|
||||
* @param {Number} scale The scaling factor.
|
||||
|
@ -118,7 +118,7 @@ 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 {Point} [center] The optional center for the scaling
|
||||
|
@ -148,7 +148,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
|
||||
/**
|
||||
* 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({
|
|||
*/
|
||||
/**
|
||||
* 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.
|
||||
* @return {Matrix} This affine transform.
|
||||
|
@ -172,7 +172,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* 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.
|
||||
|
@ -182,7 +182,7 @@ 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.
|
||||
|
@ -195,7 +195,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
|
||||
/**
|
||||
* Concatentates this transform with a shear transformation.
|
||||
*
|
||||
*
|
||||
* @name Matrix#shear
|
||||
* @function
|
||||
* @param {Point} point The shear factor in x and y direction.
|
||||
|
@ -204,7 +204,7 @@ 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 {Point} [center] The optional center for the shear transformation.
|
||||
|
@ -274,7 +274,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
|
||||
/**
|
||||
* Concatenates an affine transform to this transform.
|
||||
*
|
||||
*
|
||||
* @param {Matrix} mx The transform to concatenate.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
|
@ -295,7 +295,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
|
||||
/**
|
||||
* Pre-concatenates an affine transform to this transform.
|
||||
*
|
||||
*
|
||||
* @param {Matrix} mx The transform to preconcatenate.
|
||||
* @return {Matrix} This affine transform.
|
||||
*/
|
||||
|
@ -321,9 +321,9 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* 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 {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.
|
||||
|
@ -416,7 +416,7 @@ var Matrix = this.Matrix = Base.extend({
|
|||
/**
|
||||
* 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() {
|
||||
|
@ -460,7 +460,7 @@ 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.
|
||||
* @return {Matrix} This affine transform.
|
||||
|
@ -471,7 +471,7 @@ 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.
|
||||
* @return {Matrix} This affine transform.
|
||||
|
@ -483,7 +483,7 @@ 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.
|
||||
* @return {Matrix} This affine transform.
|
||||
|
@ -494,7 +494,7 @@ 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.
|
||||
|
@ -536,7 +536,7 @@ 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.
|
||||
* @return {Matrix} A transform representing a scaling
|
||||
|
@ -549,7 +549,7 @@ 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.
|
||||
* @return {Matrix} A transform representing a translation
|
||||
|
@ -562,7 +562,7 @@ 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.
|
||||
* @return {Matrix} A transform representing a shearing transformation.
|
||||
|
@ -574,7 +574,7 @@ 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.
|
||||
|
|
|
@ -21,9 +21,10 @@ var Point = this.Point = Base.extend({
|
|||
|
||||
/**
|
||||
* Creates a Point object with the given x and y coordinates.
|
||||
*
|
||||
*
|
||||
* @name Point
|
||||
* @constructor
|
||||
*
|
||||
* @param {Number} x the x coordinate
|
||||
* @param {Number} y the y coordinate
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ var Point = this.Point = Base.extend({
|
|||
/**
|
||||
* Creates a Point object using the numbers in the given array as
|
||||
* coordinates.
|
||||
*
|
||||
*
|
||||
* @name Point#initialize
|
||||
* @param {array} array
|
||||
*
|
||||
|
@ -56,7 +57,7 @@ var Point = this.Point = Base.extend({
|
|||
* var point = new Point(array);
|
||||
* console.log(point.x); // 10
|
||||
* console.log(point.y); // 5
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* // Passing an array to a functionality that expects a point:
|
||||
*
|
||||
|
@ -71,7 +72,7 @@ var Point = this.Point = Base.extend({
|
|||
*/
|
||||
/**
|
||||
* Creates a Point object using the properties in the given object.
|
||||
*
|
||||
*
|
||||
* @name Point#initialize
|
||||
* @param {object} object
|
||||
*
|
||||
|
@ -163,7 +164,7 @@ var Point = this.Point = Base.extend({
|
|||
|
||||
/**
|
||||
* The x coordinate of the point
|
||||
*
|
||||
*
|
||||
* @name Point#x
|
||||
* @type Number
|
||||
*/
|
||||
|
@ -390,7 +391,7 @@ var Point = this.Point = Base.extend({
|
|||
/**
|
||||
* Transforms the point by the matrix as a new point. The object itself
|
||||
* is not modified!
|
||||
*
|
||||
*
|
||||
* @param {Matrix} matrix
|
||||
* @return {Point} the transformed point
|
||||
*/
|
||||
|
@ -402,7 +403,7 @@ var Point = this.Point = Base.extend({
|
|||
* {@grouptitle Distance & Length}
|
||||
*
|
||||
* Returns the distance between the point and another point.
|
||||
*
|
||||
*
|
||||
* @param {Point} point
|
||||
* @return {Number}
|
||||
*/
|
||||
|
@ -826,7 +827,7 @@ var Point = this.Point = Base.extend({
|
|||
*
|
||||
* @returns {Point} The newly created point object
|
||||
* @static
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* var maxPoint = new Point(100, 100);
|
||||
* var randomPoint = Point.random();
|
||||
|
|
|
@ -16,13 +16,15 @@
|
|||
|
||||
var Rectangle = this.Rectangle = Base.extend({
|
||||
/** @lends Rectangle# */
|
||||
|
||||
beans: true,
|
||||
|
||||
/**
|
||||
* Creates a Rectangle object.
|
||||
*
|
||||
*
|
||||
* @name Rectangle
|
||||
* @constructor
|
||||
*
|
||||
* @param {Point} point the top-left point of the rectangle
|
||||
* @param {Size} size the size of the rectangle
|
||||
*
|
||||
|
@ -141,7 +143,7 @@ var Rectangle = this.Rectangle = Base.extend({
|
|||
|
||||
/**
|
||||
* The top-left point of the rectangle
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -158,7 +160,7 @@ var Rectangle = this.Rectangle = Base.extend({
|
|||
|
||||
/**
|
||||
* The size of the rectangle
|
||||
*
|
||||
*
|
||||
* @type Size
|
||||
* @bean
|
||||
*/
|
||||
|
@ -674,7 +676,7 @@ var LinkedRectangle = Rectangle.extend({
|
|||
* Provide a faster creator for Points out of two coordinates that
|
||||
* does not rely on Point#initialize at all. This speeds up all math
|
||||
* operations a lot.
|
||||
*
|
||||
*
|
||||
* @ignore
|
||||
*/
|
||||
create: function(owner, setter, x, y, width, height) {
|
||||
|
|
|
@ -44,7 +44,7 @@ var Size = this.Size = Base.extend({
|
|||
/**
|
||||
* Creates a Size object using the numbers in the given array as
|
||||
* dimensions.
|
||||
*
|
||||
*
|
||||
* @name Size#initialize
|
||||
* @param {array} array
|
||||
*
|
||||
|
@ -57,7 +57,7 @@ var Size = this.Size = Base.extend({
|
|||
*/
|
||||
/**
|
||||
* Creates a Size object using the properties in the given object.
|
||||
*
|
||||
*
|
||||
* @name Size#initialize
|
||||
* @param {object} object
|
||||
*
|
||||
|
@ -73,7 +73,7 @@ var Size = this.Size = Base.extend({
|
|||
*/
|
||||
/**
|
||||
* Creates a Size object using the coordinates of the given Size object.
|
||||
*
|
||||
*
|
||||
* @name Size#initialize
|
||||
* @param {Size} size
|
||||
*/
|
||||
|
@ -127,14 +127,14 @@ var Size = this.Size = Base.extend({
|
|||
|
||||
/**
|
||||
* The width of the size
|
||||
*
|
||||
*
|
||||
* @name Size#width
|
||||
* @type Number
|
||||
*/
|
||||
|
||||
/**
|
||||
* The height of the size
|
||||
*
|
||||
*
|
||||
* @name Size#height
|
||||
* @type Number
|
||||
*/
|
||||
|
@ -322,7 +322,7 @@ var Size = this.Size = Base.extend({
|
|||
/**
|
||||
* Checks whether the width and height of the size are equal to those of the
|
||||
* supplied size.
|
||||
*
|
||||
*
|
||||
* @param {Size}
|
||||
* @return {Boolean}
|
||||
*
|
||||
|
|
|
@ -364,7 +364,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
|
||||
/**
|
||||
* Checks if the color has an alpha value.
|
||||
*
|
||||
*
|
||||
* @return {Boolean} {@true if the color has an alpha value}
|
||||
*/
|
||||
hasAlpha: function() {
|
||||
|
@ -431,7 +431,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
|
||||
/**
|
||||
* {@grouptitle RGB Components}
|
||||
*
|
||||
*
|
||||
* The amount of red in the color as a value between {@code 0} and
|
||||
* {@code 1}.
|
||||
*
|
||||
|
@ -488,7 +488,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
|
||||
/**
|
||||
* {@grouptitle Gray Components}
|
||||
*
|
||||
*
|
||||
* The amount of gray in the color as a value between {@code 0} and
|
||||
* {@code 1}.
|
||||
*
|
||||
|
@ -499,7 +499,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
|
||||
/**
|
||||
* {@grouptitle HSB Components}
|
||||
*
|
||||
*
|
||||
* The hue of the color as a value in degrees between {@code 0} and
|
||||
* {@code 360}.
|
||||
*
|
||||
|
@ -564,7 +564,7 @@ var GrayColor = this.GrayColor = Color.extend(/** @scope GrayColor */{
|
|||
* // Create a circle shaped path at {x: 80, y: 50}
|
||||
* // with a radius of 30:
|
||||
* var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
*
|
||||
*
|
||||
* // Create a GrayColor with 50% gray:
|
||||
* circle.fillColor = new GrayColor(0.5);
|
||||
*/
|
||||
|
@ -596,7 +596,7 @@ var RGBColor = this.RGBColor = Color.extend(/** @scope RGBColor */{
|
|||
* // Create a circle shaped path at {x: 80, y: 50}
|
||||
* // with a radius of 30:
|
||||
* var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
*
|
||||
*
|
||||
* // 100% red, 0% blue, 50% blue:
|
||||
* circle.fillColor = new RGBColor(1, 0, 0.5);
|
||||
*/
|
||||
|
@ -621,14 +621,14 @@ var HSBColor = this.HSBColor = Color.extend(/** @scope HSBColor */{
|
|||
*
|
||||
* @class An HSBColor object is used to represent any HSB color value.
|
||||
* @extends Color
|
||||
*
|
||||
*
|
||||
* @example {@paperscript}
|
||||
* // Creating an HSBColor:
|
||||
*
|
||||
* // Create a circle shaped path at {x: 80, y: 50}
|
||||
* // with a radius of 30:
|
||||
* var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
*
|
||||
*
|
||||
* // Create an HSBColor with a hue of 90 degrees, a saturation
|
||||
* // 100% and a brightness of 100%:
|
||||
* circle.fillColor = new HSBColor(90, 1, 1);
|
||||
|
|
|
@ -70,7 +70,7 @@ var Gradient = this.Gradient = Base.extend({
|
|||
|
||||
/**
|
||||
* Checks whether the gradient is equal to the supplied gradient.
|
||||
*
|
||||
*
|
||||
* @param {Gradient} gradient
|
||||
* @return {Boolean} {@true they are equal}
|
||||
*/
|
||||
|
|
|
@ -104,7 +104,7 @@ var GradientColor = this.GradientColor = Color.extend({
|
|||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*
|
||||
*
|
||||
* @example {@paperscript height=200}
|
||||
* // Move the origin point of the gradient, by moving your mouse over
|
||||
* // the view below:
|
||||
|
|
|
@ -128,7 +128,7 @@ var PaperScope = this.PaperScope = Base.extend({
|
|||
* Installs the paper scope into any other given scope. Can be used for
|
||||
* examle to inject the currently active PaperScope into the window's global
|
||||
* scope, to emulate PaperScript-style globally accessible Paper classes:
|
||||
*
|
||||
*
|
||||
* paper.install(window);
|
||||
* @ignore
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,7 @@ var Group = this.Group = Item.extend({
|
|||
* Specifies whether the group item is to be clipped.
|
||||
* When setting to {@code true}, the first child in the group is
|
||||
* automatically defined as the clipping mask.
|
||||
*
|
||||
*
|
||||
* @type Boolean
|
||||
* @bean
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
var Item = this.Item = Base.extend({
|
||||
/** @lends Item# */
|
||||
|
||||
beans: true,
|
||||
|
||||
initialize: function() {
|
||||
|
@ -39,7 +40,7 @@ var Item = this.Item = Base.extend({
|
|||
/**
|
||||
* Private notifier that is called whenever a change occurs in this item or
|
||||
* its sub-elements, such as Segments, Curves, PathStyles, etc.
|
||||
*
|
||||
*
|
||||
* @param {ChangeFlags} flags describes what exactly has changed.
|
||||
*/
|
||||
_changed: function(flags) {
|
||||
|
@ -120,7 +121,7 @@ var Item = this.Item = Base.extend({
|
|||
*
|
||||
* // Move the circle 100 points to the right and 50 points down
|
||||
* circle.position += new Point(100, 50);
|
||||
*
|
||||
*
|
||||
* @example {@paperscript split=true height=100}
|
||||
* // Changing the x coordinate of an item's position:
|
||||
*
|
||||
|
@ -152,7 +153,7 @@ var Item = this.Item = Base.extend({
|
|||
*
|
||||
* @type PathStyle
|
||||
* @bean
|
||||
*
|
||||
*
|
||||
* @example {@paperscript}
|
||||
* // Applying several styles to an item in one go, by passing an object
|
||||
* // to its style property:
|
||||
|
@ -198,12 +199,12 @@ var Item = this.Item = Base.extend({
|
|||
* Specifies whether an item is selected and will also return {@code true}
|
||||
* if the item is partially selected (groups with some selected or partially
|
||||
* selected paths).
|
||||
*
|
||||
*
|
||||
* Paper.js draws the visual outlines of selected items on top of your
|
||||
* project. This can be useful for debugging, as it allows you to see the
|
||||
* construction of paths, position of path curves, individual segment points
|
||||
* and bounding boxes of symbol and raster items.
|
||||
*
|
||||
*
|
||||
* @type Boolean
|
||||
* @bean
|
||||
* @see Project#selectedItems
|
||||
|
@ -404,7 +405,7 @@ var Item = this.Item = Base.extend({
|
|||
*
|
||||
* @type Item[]
|
||||
* @bean
|
||||
*
|
||||
*
|
||||
* @example {@paperscript}
|
||||
* // Accessing items in the children array:
|
||||
* var path = new Path.Circle(new Point(80, 50), 35);
|
||||
|
@ -412,7 +413,7 @@ var Item = this.Item = Base.extend({
|
|||
* // Create a group and move the path into it:
|
||||
* var group = new Group();
|
||||
* group.appendTop(path);
|
||||
*
|
||||
*
|
||||
* // Access the path through the group's children array:
|
||||
* group.children[0].fillColor = 'red';
|
||||
*
|
||||
|
@ -1224,7 +1225,7 @@ var Item = this.Item = Base.extend({
|
|||
|
||||
/**
|
||||
* Transform the item.
|
||||
*
|
||||
*
|
||||
* @param {Matrix} matrix
|
||||
* @param {Array} flags Array of any of the following: 'objects', 'children',
|
||||
* 'fill-gradients', 'fill-patterns', 'stroke-patterns', 'lines'.
|
||||
|
@ -1395,7 +1396,7 @@ var Item = this.Item = Base.extend({
|
|||
* Inserts the specified item as a child of the item by appending it to
|
||||
* the list of children and moving it above all other children. You can
|
||||
* use this function for groups, compound paths and layers.
|
||||
*
|
||||
*
|
||||
* @function
|
||||
* @param {Item} item The item that will be appended as a child
|
||||
*/
|
||||
|
@ -1422,7 +1423,7 @@ var Item = this.Item = Base.extend({
|
|||
|
||||
/**
|
||||
* Moves the item below the specified item.
|
||||
*
|
||||
*
|
||||
* @function
|
||||
* @param {Item} item the item below which it should be moved
|
||||
* @return {Boolean} {@true it was moved}
|
||||
|
@ -1489,7 +1490,7 @@ var Item = this.Item = Base.extend({
|
|||
|
||||
/**
|
||||
* Removes the item when the next {@link Tool#onMouseDown} event is fired.
|
||||
*
|
||||
*
|
||||
* @name Item#removeOnDown
|
||||
* @function
|
||||
*
|
||||
|
|
|
@ -40,7 +40,7 @@ var PathStyle = this.PathStyle = Base.extend(new function() {
|
|||
* PathStyle objects don't need to be created directly. Just pass an
|
||||
* object to {@link Item#style} or {@link Project#currentStyle}, it will
|
||||
* be converted to a PathStyle object internally.
|
||||
*
|
||||
*
|
||||
* @constructs PathStyle
|
||||
* @param {object} style
|
||||
*
|
||||
|
|
|
@ -59,7 +59,7 @@ var PlacedSymbol = this.PlacedSymbol = Item.extend({
|
|||
*
|
||||
* @class A PlacedSymbol represents an instance of a symbol which has been
|
||||
* placed in a Paper.js project.
|
||||
*
|
||||
*
|
||||
* @extends Item
|
||||
* @constructs PlacedSymbol
|
||||
*/
|
||||
|
@ -75,7 +75,7 @@ var PlacedSymbol = this.PlacedSymbol = Item.extend({
|
|||
|
||||
/**
|
||||
* The symbol that the placed symbol refers to:
|
||||
*
|
||||
*
|
||||
* @name PlacedSymbol#symbol
|
||||
* @type Symbol
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@ var Raster = this.Raster = Item.extend({
|
|||
*
|
||||
* @constructs Raster
|
||||
* @param {HTMLImageElement|Canvas|string} [object]
|
||||
*
|
||||
*
|
||||
* @class The Raster item represents an image in a Paper.js project.
|
||||
*
|
||||
* @extends Item
|
||||
|
@ -62,7 +62,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* The size of the raster in pixels.
|
||||
*
|
||||
*
|
||||
* @type Size
|
||||
* @bean
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* The width of the raster in pixels.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* The height of the raster in pixels.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -102,7 +102,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* Pixels per inch of the raster at its current size.
|
||||
*
|
||||
*
|
||||
* @type Size
|
||||
* @bean
|
||||
*/
|
||||
|
@ -119,7 +119,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* The Canvas 2d drawing context of the raster.
|
||||
*
|
||||
*
|
||||
* @type Context
|
||||
* @bean
|
||||
*/
|
||||
|
@ -155,7 +155,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* The HTMLImageElement or Canvas of the raster.
|
||||
*
|
||||
*
|
||||
* @type HTMLImageElement|Canvas
|
||||
* @bean
|
||||
*/
|
||||
|
@ -275,7 +275,7 @@ var Raster = this.Raster = Item.extend({
|
|||
/**
|
||||
* {@grouptitle Pixels}
|
||||
* Gets the color of a pixel in the raster.
|
||||
*
|
||||
*
|
||||
* @name Raster#getPixel
|
||||
* @function
|
||||
* @param x the x offset of the pixel in pixel coordinates
|
||||
|
@ -298,7 +298,7 @@ var Raster = this.Raster = Item.extend({
|
|||
|
||||
/**
|
||||
* Sets the color of the specified pixel to the specified color.
|
||||
*
|
||||
*
|
||||
* @name Raster#setPixel
|
||||
* @function
|
||||
* @param x the x offset of the pixel in pixel coordinates
|
||||
|
|
|
@ -32,7 +32,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
*
|
||||
* // Move the inner circle 5pt to the right:
|
||||
* compoundPath.children[1].position.x += 5;
|
||||
*
|
||||
*
|
||||
* @class A compound path contains two or more paths, holes are drawn
|
||||
* where the paths overlap. All the paths in a compound path take on the
|
||||
* style of the backmost path and can be accessed through its
|
||||
|
@ -65,7 +65,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
* If this is a compound path with only one path inside,
|
||||
* the path is moved outside and the compound path is erased.
|
||||
* Otherwise, the compound path is returned unmodified.
|
||||
*
|
||||
*
|
||||
* @return {CompoundPath|Path} the simplified compound path
|
||||
*/
|
||||
simplify: function() {
|
||||
|
@ -164,7 +164,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
/**
|
||||
* Adds a cubic bezier curve to the current path, defined by two handles and
|
||||
* a to point.
|
||||
*
|
||||
*
|
||||
* @name CompoundPath#cubicCurveTo
|
||||
* @function
|
||||
* @param {Point} handle1
|
||||
|
@ -175,7 +175,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
/**
|
||||
* Adds a quadratic bezier curve to the current path, defined by a handle
|
||||
* and a to point.
|
||||
*
|
||||
*
|
||||
* @name CompoundPath#quadraticCurveTo
|
||||
* @function
|
||||
* @param {Point} handle
|
||||
|
|
|
@ -21,12 +21,13 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* Creates a new curve object.
|
||||
*
|
||||
*
|
||||
* @name Curve
|
||||
* @constructor
|
||||
*
|
||||
* @param {Segment} segment1
|
||||
* @param {Segment} segment2
|
||||
*
|
||||
*
|
||||
* @class The Curve object represents...
|
||||
*/
|
||||
initialize: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
||||
|
@ -64,7 +65,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The first anchor point of the curve.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -79,7 +80,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The second anchor point of the curve.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -94,7 +95,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The handle point that describes the tangent in the first anchor point.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -109,7 +110,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The handle point that describes the tangent in the second anchor point.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -124,7 +125,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The first segment of the curve.
|
||||
*
|
||||
*
|
||||
* @type Segment
|
||||
* @bean
|
||||
*/
|
||||
|
@ -134,7 +135,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The second segment of the curve.
|
||||
*
|
||||
*
|
||||
* @type Segment
|
||||
* @bean
|
||||
*/
|
||||
|
@ -144,7 +145,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The path that the curve belongs to.
|
||||
*
|
||||
*
|
||||
* @type Path
|
||||
* @bean
|
||||
*/
|
||||
|
@ -154,7 +155,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* The index of the curve in the {@link Path#curves} array.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -165,7 +166,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* The next curve in the {@link Path#curves} array that the curve
|
||||
* belongs to.
|
||||
*
|
||||
*
|
||||
* @type Curve
|
||||
* @bean
|
||||
*/
|
||||
|
@ -178,7 +179,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* The previous curve in the {@link Path#curves} array that the curve
|
||||
* belongs to.
|
||||
*
|
||||
*
|
||||
* @type Curve
|
||||
* @bean
|
||||
*/
|
||||
|
@ -190,7 +191,7 @@ var Curve = this.Curve = Base.extend({
|
|||
|
||||
/**
|
||||
* Specifies whether the handles of the curve are selected.
|
||||
*
|
||||
*
|
||||
* @type Boolean
|
||||
* @bean
|
||||
*/
|
||||
|
@ -210,7 +211,7 @@ var Curve = this.Curve = Base.extend({
|
|||
// DOCS: document Curve#getLength(from, to)
|
||||
/**
|
||||
* The approximated length of the curve in points.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -305,7 +306,7 @@ var Curve = this.Curve = Base.extend({
|
|||
/**
|
||||
* Returns a reversed version of the curve, without modifying the curve
|
||||
* itself.
|
||||
*
|
||||
*
|
||||
* @return {Curve} a reversed version of the curve
|
||||
*/
|
||||
reverse: function() {
|
||||
|
|
|
@ -27,13 +27,13 @@ CurveLocation = Base.extend({
|
|||
// {@link PathItem#getIntersections(PathItem)}, etc.
|
||||
/**
|
||||
* Creates a new CurveLocation object.
|
||||
*
|
||||
*
|
||||
* @name CurveLocation
|
||||
* @constructor
|
||||
* @param {Curve} curve
|
||||
* @param {Number} parameter
|
||||
* @param {Point} point
|
||||
*
|
||||
*
|
||||
* @class CurveLocation objects describe a location on {@link Curve}
|
||||
* objects, as defined by the curve {@link #parameter}, a value between
|
||||
* {@code 0} (beginning of the curve) and {@code 1} (end of the curve). If
|
||||
|
@ -48,7 +48,7 @@ CurveLocation = Base.extend({
|
|||
|
||||
/**
|
||||
* The segment of the curve which is closer to the described location.
|
||||
*
|
||||
*
|
||||
* @type Segment
|
||||
* @bean
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ CurveLocation = Base.extend({
|
|||
|
||||
/**
|
||||
* The curve by which the location is defined.
|
||||
*
|
||||
*
|
||||
* @type Curve
|
||||
* @bean
|
||||
*/
|
||||
|
@ -84,7 +84,7 @@ CurveLocation = Base.extend({
|
|||
|
||||
/**
|
||||
* The item this curve belongs to, if any.
|
||||
*
|
||||
*
|
||||
* @type Item
|
||||
* @bean
|
||||
*/
|
||||
|
@ -95,7 +95,7 @@ CurveLocation = Base.extend({
|
|||
/**
|
||||
* The index of the curve within the {@link Path#curves} list, if the
|
||||
* curve is part of a {@link Path} item.
|
||||
*
|
||||
*
|
||||
* @type Index
|
||||
* @bean
|
||||
*/
|
||||
|
@ -106,7 +106,7 @@ CurveLocation = Base.extend({
|
|||
/**
|
||||
* The length of the path from its beginning up to the location described
|
||||
* by this object.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -118,7 +118,7 @@ CurveLocation = Base.extend({
|
|||
/**
|
||||
* The length of the curve from its beginning up to the location described
|
||||
* by this object.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -131,7 +131,7 @@ CurveLocation = Base.extend({
|
|||
* The curve parameter, as used by various bezier curve calculations. It is
|
||||
* value between {@code 0} (beginning of the curve) and {@code 1} (end of
|
||||
* the curve).
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -144,7 +144,7 @@ CurveLocation = Base.extend({
|
|||
/**
|
||||
* The point which is defined by the {@link #curve} and
|
||||
* {@link #parameter}.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -159,7 +159,7 @@ CurveLocation = Base.extend({
|
|||
|
||||
/**
|
||||
* The tangential vector to the {@link #curve} at the given location.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -171,7 +171,7 @@ CurveLocation = Base.extend({
|
|||
|
||||
/**
|
||||
* The normal vector to the {@link #curve} at the given location.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ var Path = this.Path = PathItem.extend({
|
|||
*
|
||||
* @param {Segment[]} [segments] An optional array of segments (or points to be
|
||||
* converted to segments) that will be added to the path.
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* // Create an empty path and add segments to it:
|
||||
* var path = new Path();
|
||||
|
@ -564,12 +564,12 @@ var Path = this.Path = PathItem.extend({
|
|||
* Specifies whether an path is selected and will also return {@code true}
|
||||
* if the path is partially selected, i.e. one or more of its segments is
|
||||
* selected.
|
||||
*
|
||||
*
|
||||
* Paper.js draws the visual outlines of selected items on top of your
|
||||
* project. This can be useful for debugging, as it allows you to see the
|
||||
* construction of paths, position of path curves, individual segment points
|
||||
* and bounding boxes of symbol and raster items.
|
||||
*
|
||||
*
|
||||
* @type Boolean
|
||||
* @bean
|
||||
* @see Project#selectedItems
|
||||
|
@ -616,7 +616,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* if (path.fullySelected) {
|
||||
* path.fillColor = 'red';
|
||||
* }
|
||||
*
|
||||
*
|
||||
* // If the second path is fully selected (which it isn't, since we just
|
||||
* // deselected its second segment),
|
||||
* // set its fill color to red:
|
||||
|
@ -1083,7 +1083,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* @param {Number} offset
|
||||
* @param {Boolean} [isParameter=false]
|
||||
* @return {Point} the normal vector at the given offset
|
||||
*
|
||||
*
|
||||
* @example {@paperscript height=150}
|
||||
* // Working with the normal vector at a given offset:
|
||||
*
|
||||
|
@ -1531,7 +1531,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* Adds a cubic bezier curve to the path, defined by two handles and a
|
||||
* to point.
|
||||
*
|
||||
*
|
||||
* @param {Point} handle1
|
||||
* @param {Point} handle2
|
||||
* @param {Point} to
|
||||
|
@ -1551,7 +1551,7 @@ var Path = this.Path = PathItem.extend({
|
|||
/**
|
||||
* Adds a quadratic bezier curve to the path, defined by a handle and a
|
||||
* to point.
|
||||
*
|
||||
*
|
||||
* @param {Point} handle
|
||||
* @param {Point} to
|
||||
*/
|
||||
|
@ -1632,7 +1632,7 @@ var Path = this.Path = PathItem.extend({
|
|||
* the path that goes through the specified {@code through} point,
|
||||
* to the specified {@code to} point by adding one or more segments to
|
||||
* the path.
|
||||
*
|
||||
*
|
||||
* @name Path#arcTo
|
||||
* @function
|
||||
* @param {Point} through the point where the arc should pass through
|
||||
|
|
|
@ -107,7 +107,7 @@ var Segment = this.Segment = Base.extend({
|
|||
|
||||
/**
|
||||
* The anchor point of the segment.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -125,7 +125,7 @@ var Segment = this.Segment = Base.extend({
|
|||
/**
|
||||
* The handle point relative to the anchor point of the segment that
|
||||
* describes the in tangent of the segment.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -149,7 +149,7 @@ var Segment = this.Segment = Base.extend({
|
|||
/**
|
||||
* The handle point relative to the anchor point of the segment that
|
||||
* describes the out tangent of the segment.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -243,7 +243,7 @@ var Segment = this.Segment = Base.extend({
|
|||
*
|
||||
* The index of the segment in the {@link Path#segments} array that the
|
||||
* segment belongs to.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -253,7 +253,7 @@ var Segment = this.Segment = Base.extend({
|
|||
|
||||
/**
|
||||
* The path that the segment belongs to.
|
||||
*
|
||||
*
|
||||
* @type Path
|
||||
* @bean
|
||||
*/
|
||||
|
@ -263,7 +263,7 @@ var Segment = this.Segment = Base.extend({
|
|||
|
||||
/**
|
||||
* The curve that the segment belongs to.
|
||||
*
|
||||
*
|
||||
* @type Curve
|
||||
* @bean
|
||||
*/
|
||||
|
@ -284,7 +284,7 @@ var Segment = this.Segment = Base.extend({
|
|||
* The next segment in the {@link Path#segments} 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.
|
||||
*
|
||||
*
|
||||
* @type Segment
|
||||
* @bean
|
||||
*/
|
||||
|
@ -298,7 +298,7 @@ var Segment = this.Segment = Base.extend({
|
|||
* The previous segment in the {@link Path#segments} 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.
|
||||
*
|
||||
*
|
||||
* @type Segment
|
||||
* @bean
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ var Project = this.Project = Base.extend({
|
|||
// DOCS: Document Project constructor and class
|
||||
/**
|
||||
* Creates a Paper.js project
|
||||
*
|
||||
*
|
||||
* @name Project
|
||||
* @constructor
|
||||
*
|
||||
|
@ -114,7 +114,7 @@ var Project = this.Project = Base.extend({
|
|||
|
||||
/**
|
||||
* The index of the project in the global projects array.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
@ -124,7 +124,7 @@ var Project = this.Project = Base.extend({
|
|||
|
||||
/**
|
||||
* The selected items contained within the project.
|
||||
*
|
||||
*
|
||||
* @type Item[]
|
||||
* @bean
|
||||
*/
|
||||
|
@ -172,7 +172,7 @@ var Project = this.Project = Base.extend({
|
|||
* {@grouptitle Project Hierarchy}
|
||||
*
|
||||
* The layers contained within the project.
|
||||
*
|
||||
*
|
||||
* @name Project#layers
|
||||
* @type Layer[]
|
||||
*/
|
||||
|
@ -180,28 +180,28 @@ var Project = this.Project = Base.extend({
|
|||
/**
|
||||
* The layer which is currently active. New items will be created on this
|
||||
* layer by default.
|
||||
*
|
||||
*
|
||||
* @name Project#activeLayer
|
||||
* @type Layer
|
||||
*/
|
||||
|
||||
/**
|
||||
* The symbols contained within the project.
|
||||
*
|
||||
*
|
||||
* @name Project#symbols
|
||||
* @type Symbol[]
|
||||
*/
|
||||
|
||||
/**
|
||||
* The views contained within the project.
|
||||
*
|
||||
*
|
||||
* @name Project#views
|
||||
* @type View[]
|
||||
*/
|
||||
|
||||
/**
|
||||
* The view which is currently active.
|
||||
*
|
||||
*
|
||||
* @name Project#activeView
|
||||
* @type View
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ var Symbol = this.Symbol = Base.extend({
|
|||
*
|
||||
* @param {Item} item the source item which is copied as the definition of
|
||||
* the symbol
|
||||
*
|
||||
*
|
||||
* @name Symbol
|
||||
* @constructor
|
||||
*
|
||||
|
|
|
@ -21,12 +21,12 @@ var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
|||
* CharacterStyle objects don't need to be created directly. Just pass an
|
||||
* object to {@link TextItem#characterStyle}, it will be converted to a
|
||||
* CharacterStyle object internally.
|
||||
*
|
||||
*
|
||||
* @constructs CharacterStyle
|
||||
* @param {object} style
|
||||
*
|
||||
* @constructs CharacterStyle
|
||||
*
|
||||
*
|
||||
* @class The CharacterStyle object represents the character style of a text
|
||||
* item ({@link TextItem#characterStyle})
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
|||
|
||||
/**
|
||||
* The font of the character style.
|
||||
*
|
||||
*
|
||||
* @name CharacterStyle#font
|
||||
* @default 'sans-serif'
|
||||
* @type String
|
||||
|
@ -60,7 +60,7 @@ var CharacterStyle = this.CharacterStyle = PathStyle.extend({
|
|||
|
||||
/**
|
||||
* The font size of the character style in points.
|
||||
*
|
||||
*
|
||||
* @name CharacterStyle#fontSize
|
||||
* @default 10
|
||||
* @type Number
|
||||
|
|
|
@ -21,12 +21,12 @@ var ParagraphStyle = this.ParagraphStyle = Base.extend({
|
|||
* ParagraphStyle objects don't need to be created directly. Just pass an
|
||||
* object to {@link TextItem#paragraphStyle}, it will be converted to a
|
||||
* ParagraphStyle object internally.
|
||||
*
|
||||
*
|
||||
* @constructs ParagraphStyle
|
||||
* @param {object} style
|
||||
*
|
||||
* @constructs ParagraphStyle
|
||||
*
|
||||
*
|
||||
* @class The ParagraphStyle object represents the paragraph style of a text
|
||||
* item ({@link TextItem#paragraphStyle}).
|
||||
*
|
||||
|
@ -50,7 +50,7 @@ var ParagraphStyle = this.ParagraphStyle = Base.extend({
|
|||
|
||||
/**
|
||||
* The justification of the paragraph.
|
||||
*
|
||||
*
|
||||
* @name ParagraphStyle#justification
|
||||
* @default 'left'
|
||||
* @type String('left', 'right', 'center')
|
||||
|
|
|
@ -30,7 +30,7 @@ var PointText = this.PointText = TextItem.extend({
|
|||
* text.paragraphStyle.justification = 'center';
|
||||
* text.characterStyle.fillColor = 'black';
|
||||
* text.content = 'The contents of the point text';
|
||||
*
|
||||
*
|
||||
* @class A PointText item represents a piece of typography in your Paper.js
|
||||
* project which starts from a certain point and extends by the amount of
|
||||
* characters contained in it.
|
||||
|
|
|
@ -41,7 +41,7 @@ var TextItem = this.TextItem = Item.extend({
|
|||
|
||||
/**
|
||||
* The text contents of the text item.
|
||||
*
|
||||
*
|
||||
* @name TextItem#content
|
||||
* @type String
|
||||
*
|
||||
|
|
|
@ -24,7 +24,7 @@ var Tool = this.Tool = Base.extend({
|
|||
* Initializes the tool's settings, so a new tool can be assigned to it
|
||||
*
|
||||
* @constructs Tool
|
||||
*
|
||||
*
|
||||
* @class The Tool object refers to a script that the user can interact with
|
||||
* by using the mouse and keyboard and can be accessed through the global
|
||||
* {@code tool} variable. All its properties are also available in the paper
|
||||
|
@ -185,7 +185,7 @@ var Tool = this.Tool = Base.extend({
|
|||
*
|
||||
* @example {@paperscript}
|
||||
* // Moving a path to the position of the mouse:
|
||||
*
|
||||
*
|
||||
* // Create a circle shaped path with a radius of 10 at {x: 0, y: 0}:
|
||||
* var path = new Path.Circle([0, 0], 10);
|
||||
* path.fillColor = 'black';
|
||||
|
@ -257,7 +257,7 @@ var Tool = this.Tool = Base.extend({
|
|||
* prevented from bubbling up. This can be used for example to stop the
|
||||
* window from scrolling, when you need the user to interact with arrow
|
||||
* keys.
|
||||
*
|
||||
*
|
||||
* @name Tool#onKeyUp
|
||||
* @property
|
||||
* @type Function
|
||||
|
|
|
@ -46,7 +46,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
/**
|
||||
* The position of the mouse in project coordinates when the event was
|
||||
* fired.
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* function onMouseDrag(event) {
|
||||
* // the position of the mouse when it is dragged
|
||||
|
@ -57,7 +57,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
* // the position of the mouse when it is released
|
||||
* console.log(event.point);
|
||||
* }
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -72,7 +72,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
/**
|
||||
* The position of the mouse in project coordinates when the previous
|
||||
* event was fired.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -87,7 +87,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
/**
|
||||
* The position of the mouse in project coordinates when the mouse button
|
||||
* was last clicked.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -104,7 +104,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
* {@link #point}. This is a useful position to use when creating
|
||||
* artwork based on the moving direction of the mouse, as returned by
|
||||
* {@link #delta}.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -125,7 +125,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
* The difference between the current position and the last position of the
|
||||
* mouse when the event was fired. In case of the mouseup event, the
|
||||
* difference to the mousedown position is returned.
|
||||
*
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
|
@ -146,7 +146,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
|
|||
|
||||
/**
|
||||
* The number of times the mouse event was fired.
|
||||
*
|
||||
*
|
||||
* @type Number
|
||||
* @bean
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue