diff --git a/src/basic/Rectangle.js b/src/basic/Rectangle.js index 835f5163..d4803d10 100644 --- a/src/basic/Rectangle.js +++ b/src/basic/Rectangle.js @@ -28,6 +28,25 @@ var Rectangle = this.Rectangle = Base.extend(/** @lends Rectangle# */{ * @param {Point} point the top-left point of the rectangle * @param {Size} size the size of the rectangle */ + /** + * Creates a Rectangle object. + * + * @name Rectangle#initialize + * @param {Object} properties An object literal containing properties to be + * set on the rectangle. + * + * @example // Create a rectangle between {x: 20, y: 20} and {x: 80, y:80} + * var rectangle = new Rectangle({ + * point: [20, 20], + * size: [60, 60] + * }); + * + * @example // Create a rectangle between {x: 20, y: 20} and {x: 80, y:80} + * var rectangle = new Rectangle({ + * from: [20, 20], + * to: [80, 80] + * }); + */ /** * Creates a rectangle object. *