fixed region x,y scale bug.

This commit is contained in:
fusijie 2015-09-18 13:39:22 +08:00
parent eb480fb021
commit 23246b006b
2 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,8 @@ void ClippingRectangleNode::onBeforeVisitScissor()
const Point pos = convertToWorldSpace(Point(_clippingRegion.origin.x, _clippingRegion.origin.y));
GLView* glView = Director::getInstance()->getOpenGLView();
glView->setScissorInPoints(pos.x * scaleX,
pos.y * scaleY,
glView->setScissorInPoints(pos.x,
pos.y,
_clippingRegion.size.width * scaleX,
_clippingRegion.size.height * scaleY);
}

View File

@ -42,6 +42,7 @@ NS_CC_BEGIN
/**
@brief Clipping Rectangle Node.
@details A node that clipped with specified rectangle.
The region of ClippingRectangleNode doesn't support any transform except scale.
@js NA
*/
class CC_DLL ClippingRectangleNode : public Node