report bug about CCClippingNode

At the beginning, everything is very good…

but when I try to something ,like this:

in layer init:

CCNode* bug=(CCNode**)CCSprite::create;
bug~~>setPosition);
addChild;
CCClippingNode* clip = CCClippingNode::create;
CCSprite* sten=CCSprite::create;
clip~~>setStencil;
clip~~>setAlphaThreshold;
CCSprite* sprt=CCSprite::create;
clip~~>addChild;
bug~~>addChild;
Something strange happened.
Located at coordinates at the bottom of the circle is cut!
ps,please see the attachment 1.jpg and 2.jpg
Then,I try to Modify the TestCpp, like this:

void ScrollViewDemo::setup
{
CCNode* node=CCNode::create;
addChild;
node~~>setTag;
node~~>setPosition);
CCClippingNode clipper = CCClippingNode::create;
clipper~~>setTag;
clipper~~>setContentSize );
clipper~~>setAnchorPoint );
clipper~~>setPosition.width / 2-250, this~~>getContentSize.height / 2-220) );
//clipper~~>runAction));
node~~>addChild;
CCDrawNode stencil = CCDrawNode::create;
CCPoint rectangle[4];
rectangle[0] = ccp;
rectangle[1] = ccp.width, 0);
rectangle[2] = ccp.width, clipper~~>getContentSize.height);
rectangle[3] = ccp.height);
ccColor4F white = ;
stencil~~>drawPolygon;
clipper~~>setStencil;
CCSprite content = CCSprite::create;
content~~>setTag;
content~~>setAnchorPoint );
content~~>setPosition.width / 2, clipper~~>getContentSize.height / 2) );
clipper~~>addChild;
m_bScrolling = false;
this~~>setTouchEnabled;
}
void ScrollViewDemo::ccTouchesBegan
{
CCTouch
touch = pTouches~~>anyObject;
CCNode
clipper = this~~>getChildByTag~~>getChildByTag;
CCPoint point = clipper~~>convertToNodeSpace~~>convertToGL));
CCRect rect = CCRectMake.width, clipper~~>getContentSize.height);
m_bScrolling = rect.containsPoint;
m_lastPoint = point;
}
void ScrollViewDemo::ccTouchesMoved
{
if return;
CCTouch
touch = pTouches~~>anyObject;
CCNode**clipper = this~~>getChildByTag~~>getChildByTag;
CCPoint point = clipper~~>convertToNodeSpace~~>convertToGL));
CCPoint diff = ccpSub;
CCNode *content = clipper~~>getChildByTag;
content~~>setPosition( ccpAdd(content->getPosition(), diff) );
m_lastPoint = point;
}
@

When I enter the interface, without any problems.

but when I press next button, and back to this interface,something strange happened again

I don’t know how to describe, but you can directly use code to test the effect…

ps,CCClippingNode is very nice~
Hope\\ to\\ fix\\ bug\\ as\\ soon\\ as\\ possible
~


1.jpg (6.7 KB)


2.jpg (7.9 KB)