Libgdx-pixmap: is there any way to change the line width?

I want to draw a string and then generate a texture (using libgdx). I found out that creating a texture from circles, rectangles, and lines is easy with pixmap. But I did not know how to set the line width of the drawn figure. Is it possible to set the line width for pixmap?

Here is the code I got so far: (I tried to draw two filled circles and link them to the line)

Pixmap pixmap = new Pixmap( 16, 16, Format.RGBA8888 );
pixmap.setColor(Color.BLUE);
pixmap.fillCircle(x1, y1, 10);
pixmap.fillCircle(x2, y2, 10);
pixmap.drawLine(x2, y2, x1, y1); // this line is very thin
Texture pixmaptex = new Texture( pixmap );
pixmap.dispose();
+4
source share
1 answer

Linear widths are not reliably supported by OpenGL implementations. To draw bold lines, draw a rectangle.

See libgdx gl10.glLineWidth ()

+1

All Articles