Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
mzhao  
#1 Posted : Wednesday, July 25, 2012 5:05:05 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
Hello

What are simple ways to draw a rectangle with rounded corners, using RectangleVObject?

Thanks.
mzhao attached the following image(s):
rectanglewithroundcorner.jpg
Dmitry.Obukhov  
#2 Posted : Wednesday, July 25, 2012 9:47:04 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups:
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Unfortunately it is not possible to make a rectangle with rounded corners.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
mzhao  
#3 Posted : Friday, July 27, 2012 10:52:54 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
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();
}
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.