CCClippingNode裁剪功能

裁剪功能
//裁剪的区域形状
CCSprite *area = CCSprite::create("/res/helloworld.png");
//被裁剪的区域
CCSprite *area1 = CCSprite::create("/res/helloworld.png");
this->addChild(area);

CCClipingNode *node = CCClipingNode::create(area);
node->addChild(area1);

node->setAlphaThreshold(0);
//裁剪反转
node->setInverted(true);
addChild(node);

你可能感兴趣的:(node)