GraphicsExtensions Class

Contains extension methods for the Graphics type.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 9.2.0
C#
public static class GraphicsExtensions
Inheritance
Object    GraphicsExtensions

Remarks

  Note

When targeting .NET 7.0 or later versions this class is supported on Windows only.

Methods

DrawRoundedRectangle(Graphics, Pen, Rectangle, Int32) Draws a rounded rectangle with the specified Pen, applying the same corner radius to all corners.
DrawRoundedRectangle(Graphics, Pen, RectangleF, Single) Draws a rounded rectangle with the specified Pen, applying the same corner radius to all corners.
DrawRoundedRectangle(Graphics, Pen, Rectangle, Int32, Int32, Int32, Int32) Draws a rounded rectangle with the specified Pen, applying a custom corner radius to each corner.
DrawRoundedRectangle(Graphics, Pen, RectangleF, Single, Single, Single, Single) Draws a rounded rectangle with the specified Pen, applying a custom corner radius to each corner.
FillRoundedRectangle(Graphics, Brush, Rectangle, Int32) Fills a rounded rectangle with the specified Brush, applying the same corner radius to all corners.
FillRoundedRectangle(Graphics, Brush, RectangleF, Single) Fills a rounded rectangle with the specified Brush, applying the same corner radius to all corners.
FillRoundedRectangle(Graphics, Brush, Rectangle, Int32, Int32, Int32, Int32) Fills a rounded rectangle with the specified Brush, applying a custom corner radius to each corner.
FillRoundedRectangle(Graphics, Brush, RectangleF, Single, Single, Single, Single) Fills a rounded rectangle with the specified Brush, applying a custom corner radius to each corner.
ToBitmap Copies the Graphics object specified in the graphics parameter to a Bitmap instance.

See Also