GraphicsExtensionsDrawRoundedRectangle(Graphics, Pen, Rectangle, Int32) Method

Draws a rounded rectangle specified by a bounding Rectangle and a common corner radius value for each corners.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
C#
public static void DrawRoundedRectangle(
	this Graphics graphics,
	Pen pen,
	Rectangle bounds,
	int cornerRadius
)

Parameters

graphics  Graphics
The Graphics instance to draw on.
pen  Pen
The Pen instance to be used for the drawing.
bounds  Rectangle
A Rectangle that bounds the rounded rectangle.
cornerRadius  Int32
Size of the corner radius for each corners.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Graphics. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also