Comes with overloaded methods to draw lines, paths, ellipses, regular polygons and rectangles.

Here's a link to the github, you can read more about it in the wiki:
https://github.com/earlygrey/shapedrawer
To create a ShapeDrawer instance you just need a Batch and a TextureRegion. Typically this is a single white pixel so that you can easily colour it, and is best packed into an atlas with your other textures.
To instantiate a ShapeDrawer, use:
- Code: Select all
ShapeDrawer drawer = new ShapeDrawer(batch, region);
And to use it, simply call its drawing methods in between Batch#begin() and Batch#end(). Something like this:
- Code: Select all
batch.begin();
drawer.line(0, 0, 100, 100);
batch.end();
Uses MIT license. Any issues/questions let me know!