I created a new library for drawing shapes.
Currently supports drawing filled circles and rectangles with a border. It works similarly to the SpriteBatch. I tested it on the DesktopGL and WindowsDX platforms. I’m using SDFs which means the shapes should look good at any size.
using Apos.Shapes; // ... _graphics.GraphicsProfile = GraphicsProfile.HiDef; // ... ShapeBatch _sb = new ShapeBatch(GraphicsDevice, Content); // ... _sb.Begin(); _sb.DrawCircle(new Vector2(100f, 0f), 100f, Color.Red, Color.White, 4f); _sb.DrawCircle(new Vector2(100, 100), 50, Color.Red, Color.White, 4f); _sb.DrawCircle(new Vector2(170, 150), 75, Color.Blue * 0.5f, Color.White, 2f); _sb.DrawRectangle(new Vector2(400, 120), new Vector2(100, 200), Color.Green, Color.White, 10f); _sb.End();
I’ll be adding more shapes over time including stuff like rounded rectangles.