1
votes

I'm using cocos2d-x and want to create a dynamic shape as part of my user interface. I need a circle with an adjustable section removed. I attempted this using the draw method but item would be drawn every frame which required too much processing power. What would be an efficient way to achieve this without drawing the shape every frame? Is it possible to clip a circle sprite to remove a section?

enter image description here

The mathematics behind the implementation is ok, I'm just looking for a high level explanation about how I should approach this.

2

2 Answers

1
votes

you can have a try on CCTransitionProgressRadialCW. This class contains something similar to what you want.

1
votes

Turns out theres a class specifically designed for this, CCProgressTimer.