RoundRect.cs
JonasKohl.Graphics RoundRect

A simple helper class to draw pixel-perfect symmetric rectangles with rounded corners. Adapted from https://www.codeproject.com/Articles/27228/A-class-for-creating-round-rectangles-in-GDI-with and ported from C++ to C#.NET by Jonas Kohl [http://jonaskohl.de/]

System.Drawing.Drawing2d.GraphicsPath GetRoundRectPath Generate the path of a rounded rectangle System.Drawing.Rectangle r The rectangle to use System.Int32 dia The diameter The GraphicsPath which resembles a rounded rectangle
void DrawRoundRect Draw (outline) a rounded rectangle to a graphics context. System.Drawing.Graphics pGraphics The graphics context System.Drawing.Rectangle r The bounding rectangle System.Drawing.Color color The color of the outline System.Int32 radius The corner radius System.Int32 width The width of the outline
void FillRoundRect Fill a rounded rectangle to a graphics context. System.Drawing.Graphics pGraphics The graphics context System.Drawing.Brush pBrush The brush to fill the rectangle with System.Drawing.Rectangle r The bounding rectangle System.Drawing.Color border The outline (border) color System.Int32 radius The corner radius