Hello
What are simple ways to draw a rectangle with rounded corners, using RectangleVObject?
Thanks.
Dmitry.Obukhov#16684Hello,
Unfortunately it is not possible to make a rectangle with rounded corners.
public RoundRectangleVObject(System.Drawing.RectangleF r, int d)
: base("roundrectangle")
{
// d = size of rounded corner
_path = new System.Drawing.Drawing2D.GraphicsPath();
_path.StartFigure();
_path.AddArc(r.X, r.Y, d, d, 180, 90);
_path.AddArc(r.X + r.Width - d, r.Y, d, d, 270, 90);
_path.AddArc(r.X + +r.Width - d, r.Y + r.Height-d, d, d, 360, 90);
_path.AddArc(r.X, r.Y + r.Height-d, d, d, 90, 90);
_path.CloseFigure();
}