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();
source
share