mirror of https://github.com/axmolengine/axmol.git
fixed region x,y scale bug.
This commit is contained in:
parent
eb480fb021
commit
23246b006b
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue