make CCRect accept width<0 and height<0

This commit is contained in:
minggo 2013-01-29 14:03:03 +08:00
parent db61976a71
commit fbcb33eefd
1 changed files with 2 additions and 2 deletions

View File

@ -119,8 +119,8 @@ CCRect& CCRect::operator= (const CCRect& other)
void CCRect::setRect(float x, float y, float width, float height)
{
// Only support that, the width and height > 0
CCAssert(width >= 0.0f && height >= 0.0f, "width and height of Rect must not less than 0.");
// CGRect can support width<0 or height<0
// CCAssert(width >= 0.0f && height >= 0.0f, "width and height of Rect must not less than 0.");
origin.x = x;
origin.y = y;