cocos2dx 新手引導
阿新 • • 發佈:2018-11-02
static CCClippingNode* create(); //使用一個節點作為模版建立裁剪節點 static CCClippingNode* create(CCNode *pStencil); //不帶模版地初始化一個裁剪節點 virtual bool init(); //使用一個節點作為模版初始化裁剪節點 virtual bool init(CCNode *pStencil); //設定/獲取模版,注意模版需要retain! CCNode* getStencil() const; void setStencil(CCNode *pStencil); //設定alpha值(0~1),這個很重要,裁剪是按畫素摳圖的,所以只有大於這個alpha值的模版畫素才會被畫出來 //預設是1,也就是完全裁剪。 GLfloat getAlphaThreshold() const; void setAlphaThreshold(GLfloat fAlphaThreshold); //預設是false,用於設定顯示底板還是模版 bool isInverted() const; void setInverted(bool bInverted);