Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom link drawing mode, a question... (Read 1847 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Custom link drawing mode, a question...
Sep 19th, 2013 at 3:42pm
Print Post  
Is there a way to override the custom draw behavior of a link, but in some cases, rely on the default drawing behavior? That is, setting LinkCustomDraw to CustomDraw.Full, but then calling a base function somewhere to draw the link as it would normally appear?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom link drawing mode, a question...
Reply #1 - Sep 19th, 2013 at 5:45pm
Print Post  
You can set the CustomDraw property of individual links. If you cannot decide whether a link should be custom drawn until the event is raised, you can draw its segments easily by calling the DrawLines or DrawBeziers method of e.Graphics with ControlPoints.GetArray() as argument, and calling link.DrawArrowhead to draw the arrowhead shapes. That won't work if you use the LinkCrossings property though.

Alternatively, your DrawLink handler could do something like this to run the standard drawing code:

Code
Select All
e.Link.CustomDraw = None;
e.Link.Draw(e.Graphics, new RenderOptions());
e.Link.CustomDraw = Full; 



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