Helpers.RoundRec Method

public static GraphicsPath RoundRec( 
Rectangle Rectangle
int Curve 
)
This language is not supported or no code example is available.

Parameters

Rectangle
Rectangle

Curve
int

Return Value

GraphicsPath
public static GraphicsPath RoundRec(Rectangle Rectangle, int Curve)
 {
     GraphicsPath graphicsPath = new GraphicsPath();
     int num = Curve * 2;
     graphicsPath.AddArc(new Rectangle(Rectangle.X, Rectangle.Y,
         num, num),
         -180f, 90f);
     graphicsPath.AddArc(new Rectangle(Rectangle.Width - num + Rectangle.X,
         Rectangle.Y, num, num),
         -90f, 90f);
     graphicsPath.AddArc(new Rectangle(Rectangle.Width - num + Rectangle.X,
         Rectangle.Height - num + Rectangle.Y,
         num, num),
         0f, 90f);
     graphicsPath.AddArc(new Rectangle(Rectangle.X,
         Rectangle.Height - num + Rectangle.Y,
         num, num),
         90f, 90f);
     graphicsPath.AddLine(new Point(Rectangle.X,
         Rectangle.Height - num + Rectangle.Y), new Point(Rectangle.X,
         Curve + Rectangle.Y));
     return graphicsPath;
 }
					
This language is not supported or no code example is available.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

.NET Core

Supported in: 5.0+, 6.0+

In this article

Definition