Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Rendering events (Read 1633 times)
JHanson
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: May 4th, 2015
Rendering events
May 4th, 2015 at 10:57pm
Print Post  
I need to draw a shape next to a DiagramLink and have my shape appear over the DiagramLink. I can do it in the Diagram.DrawForeground but that is not preferred and it had some issues. I can do it in the Node.DrawHandles and it works while my mouse is over the node, but also has an issue when I drag another node over it and then mouse over the original, my custom drawn shape appears over the overlapping node. Is there an event at the node level that draws last (after the links) but won't draw on overlapping nodes and still shows after the mouse is off the node? Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Rendering events
Reply #1 - May 5th, 2015 at 7:09am
Print Post  
You could set CustomDraw property of either nodes or links and draw from DrawNode or DrawLink event handlers.

Alternatively, use an actual ShapeNode to display the shape, attaching it to a link using some of the node.AttachTo(DiagramLink) overloads.

If the shape should show near link end points, you might also try defining it as a custom Shape instance and assigning it to HeadShape / BaseShape properties (as long as you don't mind it rotating to follow link direction).

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