Clean up documentation: Always use @function / @name when there is more than one version of a method.

This commit is contained in:
Jürg Lehni 2011-06-16 19:26:50 +01:00
parent f3f49a34c6
commit 38003b6818
5 changed files with 33 additions and 11 deletions

View file

@ -119,6 +119,8 @@ var Matrix = this.Matrix = Base.extend({
/**
* Concatentates this transform with a scaling transformation.
*
* @name Matrix#scale
* @function
* @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
@ -157,6 +159,8 @@ var Matrix = this.Matrix = Base.extend({
/**
* Concatentates this transform with a translate transformation.
*
* @name Matrix#translate
* @function
* @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.
@ -183,6 +187,8 @@ 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.
* @param {Number} x The x coordinate of the anchor point.
* @param {Number} y The y coordinate of the anchor point.
@ -205,6 +211,8 @@ var Matrix = this.Matrix = Base.extend({
/**
* Concatentates this transform with a shear transformation.
*
* @name Matrix#shear
* @function
* @param {Number} shx The x shear factor.
* @param {Number} shy The y shear factor.
* @param {Point} [center] The optional center for the shear transformation.

View file

@ -487,8 +487,9 @@ var Point = this.Point = Base.extend({
* The angle is unsigned, no information about rotational direction is
* given.
*
* @type Number
* @name Point#getAngle
* @bean
* @type Number
*/
getAngle: function(/* point */) {
// Hide parameters from Bootstrap so it injects bean too
@ -524,8 +525,9 @@ var Point = this.Point = Base.extend({
* The angle is unsigned, no information about rotational direction is
* given.
*
* @type Number
* @name Point#getAngleInRadians
* @bean
* @type Number
*/
getAngleInRadians: function(/* point */) {
// Hide parameters from Bootstrap so it injects bean too

View file

@ -416,6 +416,8 @@ var Rectangle = this.Rectangle = Base.extend({
* Tests if the interior of the rectangle entirely contains the specified
* rectangle.
*
* @name Rectangle#contains
* @function
* @param {Rectangle} rect The specified rectangle
* @return {Boolean} {@true if the rectangle entirely contains the specified
* rectangle}

View file

@ -14,20 +14,20 @@
* All rights reserved.
*/
/**
* @name Item
* @class The Item type allows you to access and modify the items in
* Paper.js projects. Its functionality is inherited by different project
* item types such as {@link Path}, {@link CompoundPath}, {@link Group},
* {@link Layer} and {@link Raster}. They each add a layer of functionality that
* is unique to their type, but share the underlying properties and functions
* that they inherit from Item.
*/
var Item = this.Item = Base.extend({
/** @lends Item# */
beans: true,
/**
* @name Item
* @class The Item type allows you to access and modify the items in
* Paper.js projects. Its functionality is inherited by different project
* item types such as {@link Path}, {@link CompoundPath}, {@link Group},
* {@link Layer} and {@link Raster}. They each add a layer of functionality that
* is unique to their type, but share the underlying properties and functions
* that they inherit from Item.
*/
initialize: function() {
// If _project is already set, the item was already moved into the DOM
// hierarchy. Used by Layer, where it's added to project.layers instead
@ -1111,6 +1111,8 @@ var Item = this.Item = Base.extend({
* Scales the item by the given values from its center point, or optionally
* from a supplied point.
*
* @name Item#scale
* @function
* @param {Number} sx the horizontal scale factor
* @param {Number} sy the vertical scale factor
* @param {Point} [center=the center point of the item]
@ -1207,6 +1209,8 @@ var Item = this.Item = Base.extend({
* Shears the item by the given values from its center point, or optionally
* by a supplied point.
*
* @name Item#shear
* @function
* @param {Number} shx
* @param {Number} shy
* @param {Point} [center=the center point of the item]

View file

@ -284,6 +284,9 @@ var Raster = this.Raster = Item.extend({
*/
/**
* Gets the color of a pixel in the raster.
*
* @name Raster#getPixel
* @function
* @param point the offset of the pixel as a point in pixel coordinates
* @return {RGBColor} the color of the pixel
*/
@ -307,6 +310,9 @@ var Raster = this.Raster = Item.extend({
*/
/**
* Sets the color of the specified pixel to the specified color.
*
* @name Raster#setPixel
* @function
* @param point the offset of the pixel as a point in pixel coordinates
* @param color the color that the pixel will be set to
*/