I've started using libgdx and am trying to simply make a circle with a pretty thick stroke. As of yet I have not found anyway to make a stroke at all. pixmap.setStrokeWidth()
is even in the API but appears to have been removed (?), and Gdx.gl10.glLineWidth(width);
has no effect. How can I just change the stroke of the line?
Here is a snippet of my current code:
@Override
public void create() {
w = Gdx.graphics.getWidth();
batch = new SpriteBatch();
pixmap = new Pixmap(2 * w, 2 * w, Pixmap.Format.RGBA8888);
pixmap.setColor(Color.BLACK);
pixmap.drawCircle(w, w, w);
texture = new Texture(pixmap);
pixmap.dispose();
sprite = new Sprite(texture);
}
@Override
public void render() {
Gdx.gl.glClearColor(1, 1, 1, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
sprite.setPosition(-w / 2, -w);
sprite.draw(batch);
batch.end();
}