How can I fill a circle in libgdx?
问题 using the ShapeRenderer class, I can only fill rectangles. So how can I fill a circle? and if possible, fill a sector (portion of a circle)? 回答1: As in the example of the shaperender shapeRenderer.begin(ShapeType.Filled); shapeRenderer.setColor(0, 1, 0, 1); shapeRenderer.rect(x, y, width, height); // fills a rect shapeRenderer.circle(x, y, radius);//<--- fills a circle shapeRenderer.end(); should fill the circle. How to get a portion of a cicle i have no clue. Maybe create a mesh and fill it