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
great! thank you I wasn't able to find that shape in the examples
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, NSmartShapes are shapes that are not related to Nevron Diagram. They are used in Nevron Gauge for some indicators and gauges, so you cannot use them in a Diagram drawing document.

If you want to create a rounded rectangle with differently rounded corners than that of the predefined one, your should create a GraphicsPath that defines your shape geometry, then create an NCustomPath from it and add it to an NCompositeShape. Take a look at the Document Object Model -> Shapes -> Custom Shapes example that comes preinstalled with Nevron Diagram for .NET for a sample implementation.



Best Regards,
Nevron Support Team


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
Thanks for this answer however I still have questions regarding this RoundedRectangle shape:
- How do we adjust the radius of the rounded corners?

There is an example with NSmartShape here : http://helpdotnetvision.nevron.com/Presentation_SmartShapes_Samples_Rounded_Rectangle_Shape.html

Seems like we can adjust lots of parameters that can be adjusted for NSmartShape, but I can't find the way to add it to a document the way I add conventional NShape.

- What are NSmartShape and do you have examples of their use in a document ?

Thanks a lot
David
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


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
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