Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How can I draw the rectangle like Border to all nodes and links in the diagram. (Read 6262 times)
Todkar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 20
Joined: Jun 24th, 2013
How can I draw the rectangle like Border to all nodes and links in the diagram.
Oct 10th, 2013 at 12:23pm
Print Post  
Hi,

I have one container shape and inside that have multiple Nodes and their link.

I want to resize and set bounds to container Node base on all nodes / Links bounds.

please refer the attached image;

How can I achieve this?

How can I draw the rectangle like Border to all nodes and links in the diagram.

Thanks,


  

BorderShapeIssue.jpg (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I draw the rectangle like Border to all nodes and links in the diagram.
Reply #1 - Oct 11th, 2013 at 6:19am
Print Post  
Hi,

If that container will contain all diagram items, call diagram.GetContentBounds before creating it and set container.Bounds to the returned content rectangle.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Todkar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 20
Joined: Jun 24th, 2013
Re: How can I draw the rectangle like Border to all nodes and links in the diagram.
Reply #2 - Oct 11th, 2013 at 9:03am
Print Post  
Hi,

thanks for your reply,

I will try your suggestion

one question

see the attached image; Is it possible to get Highlighted points from the diagram? [Min and Max point of node / link utilized in the diagram; so that we draw rectangle based on that]

Thanks


  

Bounds.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I draw the rectangle like Border to all nodes and links in the diagram.
Reply #3 - Oct 11th, 2013 at 9:52am
Print Post  
Hi,

The DiagramItem.GetBounds() method returns a Rect that contains all control points for DiagramLinks or the node's bounding rectangle for DiagramNodes. You could loop over all items to collect min/max coordinates or call Rect.Union() to find the union of all items' rectangles returned by GetBounds(). You can get individual control points of links using their ControlPoints property.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint