I started using libgdx and try to just make a circle with a rather thick stroke. At the moment, I still could not make a hit. pixmap.setStrokeWidth() even in the API, but it seems to have been deleted (?), and Gdx.gl10.glLineWidth(width); It does not work. How can I just change the course 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(); }
source share