当前位置: 动力学知识库 > 问答 > 编程问答 >

About erase some pixel from CCSprite in cocos2d-x 2.x and cc.Sprite in cocos2dx-js 2.x

问题描述:

I have a picture rectangle picture. And I use it to create a CCSprite. Then I wish to erase some pixels from the angle to make the angle smooth.

For example.

The pixels distribution of the picture is like

XXXX

XXXX

XXXX

XXXX

Then I wish to "erase" some pixels of this picture, like

OXXO

XXXX

XXXX

OXXO

"erase" means let the pixel of that position invisible.

Such as setOpacity(0), setVisible(false), or directly delete the pixel. One more thing, I can't modify the original picture with tools like PS, for it is downloaded from server.

Is there anyway can do the job? Thanks

分享给朋友:
您可能感兴趣的文章:
随机阅读: