ITeye博客

CCClippingNode裁剪功能

rayln · 2013-12-04 22:20 · Cocos2d · 移动开发 · Markdown

裁剪功能


//裁剪的区域形状
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);

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。