Example #1
0
 /// <summary>
 /// Fills a rounded rectangle using the given brush, bounding rectangle, and corner radius.
 /// </summary>
 public static void FillRoundedRectangle(this Graphics g, Brush brush, RectangleF rect, float radius)
 {
     rect.Width--;
     rect.Height--;
     g.FillPath(brush, rect.ToRoundedCorneredGraphicsPath(radius));
 }
Example #2
0
 /// <summary>
 /// Draws a rounded rectangle using the given pen, bounding rectangle, and corner radius.
 /// </summary>
 public static void DrawRoundedRectangle(this Graphics g, Pen pen, RectangleF rect, float radius)
 {
     rect.Width--;
     rect.Height--;
     g.DrawPath(pen, rect.ToRoundedCorneredGraphicsPath(radius));
 }