Rectanlge with rounded corners


Author
Message
David Dieffenthaler
David Dieffenthaler
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)
Group: Forum Members
Posts: 6, Visits: 4
Hello,

I would like what is the recommended method to create rectangle shapes with rounded corners?
Is there a shape for that? Should I create it by associating 1D shapes into a group?

Thanks
David
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi David,

The easiest way to create a rounded rectangle shape is to use the basic shapes factory:

// Create a basic shapes factory

NBasicShapesFactory factory = new NBasicShapesFactory(document);

factory.DefaultSize = new NSizeF(100, 60);

 

// Use the factory to create a rounded rectangle shape

NShape roundedRectangle = factory.CreateShape(BasicShapes.RoundedRectangle);

roundedRectangle.Location = new NPointF(100, 100);

document.ActiveLayer.AddChild(roundedRectangle);



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search