Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Repaint in DiagramNodeModifying (Read 1643 times)
sledenev
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 25
Joined: Dec 16th, 2009
Repaint in DiagramNodeModifying
May 4th, 2011 at 2:45pm
Print Post  
Hello.

I'm trying to implement next behaviour: when diagram node is moving i need to detect intersection with other nodes and highlight "bottom" nodes which has been intersected.

I'm trying to solve this by adding some kind of flag in node and set it in DiagramNodeModifying event after detecting intersection. But to take new state into account I must repaint the node on every tick of DiagramNodeModifying event. This repaint is source of  significant flickering of bottom nodes.

Is there's a way to avoid frequent repaint or other way to implement my task. I can send you my sample code if required.

Thanks in advance.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Repaint in DiagramNodeModifying
Reply #1 - May 4th, 2011 at 4:35pm
Print Post  
Hi,

Are you calling DiagramView.RecreateCacheImage from the event handler? You can do that only when the flag value actually changes for some node to improve refresh speed.

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


I love YaBB 1G - SP1!

Posts: 25
Joined: Dec 16th, 2009
Re: Repaint in DiagramNodeModifying
Reply #2 - May 4th, 2011 at 4:40pm
Print Post  
RecreateCacheImage really helps. Thank you very much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint