Search code examples
libgdxgeometrystroke

How to draw colored circle with stroke in libgdx?


I found that I can do it using Pixmap:

void drawCircle(int x, int y, int radius)

Draws a circle outline with the center at x,y and a radius using the current color and stroke width.

The problem that their isn't a function that can set stroke width.

Is their any other way to do it?


Solution

  • The easiest way would be to draw one before, with a bigger radius. The stroke width would be the difference between radius2 and radius1.