I am using AndEngine, and in this area I would like to make a timer circular graph. In particular, I would like to show a waiting period for the reuse of the ability. The idea is to dynamically fill the arc as the timer advances. Something like that:

The java.awt.Graphics object has a fillArc () method which seems perfect to me. In fact, the above drawing was drawn using fillArc (50.5, 100, 100, 75, -40). Big! Now here is the problem:
AndEngine does not use Graphics () objects, it uses its own implementation of Shape (for OpenGL), and there is no specific "Circle" shape, much less a circular shape with the fillArc () method.
Possible solutions and their associated problems
After looking at the solution, I came across Drawing a circle with Andengine . "This Q & A is not very useful for me as the only answer:" Indeed, you cannot directly draw a circle "offers two alternatives: (1)" Rendering a square with a circle texture " - this will not work for me, because I need to dynamically modify the circle to create an arc; and (2) “Display a circle, actually a circle of connected triangles.” Perhaps option two will work, but there is no indication on how to do this .
I also came across Creating a circle in android andengine by box2d? ". I suspect that someone might be tempted to say: you can just create such a circle:
Body circleBody = PhysicsFactory.createCircleBody (pWorld, pSprite, BodyType.StaticBody, FixtureDef);
It really doesn't help me. I am not going to create a 2D physical body of a circle. I am looking for him.
Finally, I found this discussion , which is promising. In particular, there is a suggestion:
Use Canvas to draw [it] into a bitmap and load this bitmap as a texture source.
Sounds reasonable, although I still don't understand how to do this.
Update: My Solution "Solution"
Instead of dwelling on this, I decided to cheat (at least for now). I made a spritesheet that looks like this:

Instead of actually showing the timer on perfect fillArc (), I just pull the corresponding sprite index from the sprite based on rounding the proportion (0 to 1) to the corresponding index on the sprite. Like this:
public void setTimer(float amount) { this.setCurrentTileIndex(Math.round(amount * 20)); }
For my purposes, this works very well - I use timers for more than 2 seconds, so you really don't see a lack of detail. But maybe I can replace this with the “right” solution if someone publishes it. In addition, perhaps this sprite will be useful for those who do the same. Here, the version uses transparency instead of a green background. (So it's white on a white stackoverflow background, but it's there):
