Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Display overlay on top of diagram (Read 1785 times)
johnsuarez
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Sep 29th, 2010
Display overlay on top of diagram
Sep 29th, 2010 at 2:58pm
Print Post  
I am trying to display an alignment overlay that displays vertical/horizontal lines (from existing shapenodes in diagram), while I am dragging around a new node ( Similar to any screen designer).  The problem is I am using the DrawNode event to paint code outside the bounds of the moving node and getting strange results (lines do not appear sometimes or in wrong spots). I have set the ShapeNodes.CustomDraw = CustomDraw.Additional2, which according to docs does not have clipping region applied.   I need a way to draw graphics anywhere on diagram after the diagram has been rendered.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display overlay on top of diagram
Reply #1 - Sep 29th, 2010 at 3:08pm
Print Post  
Try drawing from the Diagram.DrawForeground event handler.
  
Back to top
 
IP Logged
 
johnsuarez
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Sep 29th, 2010
Re: Display overlay on top of diagram
Reply #2 - Sep 29th, 2010 at 3:33pm
Print Post  
Thank you, that worked.  Had to call diagram.invalidate( true) in this event to make it work. Again thank you for you very fast response.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display overlay on top of diagram
Reply #3 - Sep 29th, 2010 at 3:46pm
Print Post  
I think calling Invalidate from any drawing code will create an infinite loop of painting and invalidating... You will get the NodeModifying event raised while moving nodes around; try calling Invalidate from there.

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