cara menggambar persegi panjang di libgdx

private ShapeRenderer shapeRenderer;

// in create method:
shapeRenderer = new ShapeRenderer();
shapeRenderer.setAutoShapeType(true);

// in render method:
shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);
shapeRenderer.setColor(Color.GREEN);
shapeRenderer.rect(x, y, width, height);
shapeRenderer.end();
Pixel Freak