fixed #3048: add some comments for cc.rect

This commit is contained in:
dingpinglv 2013-10-31 14:31:25 +08:00
parent c116d070d3
commit f172abbc14
1 changed files with 8 additions and 3 deletions

View File

@ -230,9 +230,14 @@ cc.sizeEqualToSize = function (size1, size2)
return ((size1.width == size2.width) && (size1.height == size2.height));
};
//
// Rect
//
/**
* create a rect object
* @param {Number|cc.Point|cc.Rect} [x1] a Number value as x or a cc.Point object as origin or a cc.Rect clone object
* @param {Number|cc.Size} [y1] x1 a Number value as y or a cc.Size object as size
* @param {Number} [width1]
* @param {Number} [height1]
* @return {Object} a Rect object
*/
cc.rect = function(x,y,w,h)
{
if (arguments.length === 0)