CCSize visible = CCDirector::sharedDirector()->getVisibleSize();
CCDrawNode* shap = CCDrawNode::create();
CCPoint point[4] = { ccp(0, 0), ccp(128, 0), ccp(128, 128), ccp(0, 128) };
shap->drawPolygon(point, 4, ccc4f(355, 255, 255, 255), 0, ccc4f(255, 255, 255, 255));
bet_cliper_01 = CCClippingNode::create();
bet_cliper_01->setStencil(shap);
bet_cliper_01->setAnchorPoint(ccp(.5, .5));
bet_cliper_01->setPosition(ccp(visible.width / 2 - 140 - 20, visible.height / 2 + 45));
bet_cliper_01->setScale(.68f);
this->addChild(bet_cliper_01);
节点裁剪
最新推荐文章于 2022-02-24 14:50:31 发布