logo
VitNX3 Documentation

# Helpers.RoundRec Method

Namespace: VitNX2.UI.ControlsV2.UiKit
Assembly: VitNX3 (in VitNX3.dll)
VB
C#
F#
C++
JScript
Copy

    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
Source code
VB
C#
F#
C++
JScript
Copy

    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.

Applies to

#### .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+
See Also
Helpers Class
VitNX2.UI.ControlsV2.UiKit Namespace