Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need help with DiagramLink.drawArrowhead() (Read 4047 times)
RickSalut
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Location: CANADA
Joined: Dec 10th, 2014
Need help with DiagramLink.drawArrowhead()
May 25th, 2015 at 7:12pm
Print Post  
Hi,

I'm trying to figure out how to define different arrow heads for a DiagramLink and I found method drawArrowhead() but I'm bit lost with the method's parameters...

Would it be possible to get a sample of code that does a simple link with 2 different arrow heads looking like the attached picture.

Thank's a lot.
  

quill_double_arrow_heads.png ( 10 KB | 127 Downloads )
quill_double_arrow_heads.png
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need help with DiagramLink.drawArrowhead()
Reply #1 - May 26th, 2015 at 7:31am
Print Post  
Hi,

Set the BaseShape property of a link to draw arrowhead at start point:

Code
Select All
link.setBaseShape(ArrowHeads.Quill);
link.setHeadShape(ArrowHeads.Quill);
link.setBrush(new SolidBrush(Color.black)); 



You could also define a custom Shape instance to use as arrowhead, where link's end point is mapped to 50,0 point in Shape's percent coordinates.

The drawArrowhead method is just a helper to let you draw arrowhead shapes if you render links yourself from a custom class' draw() override.

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


I Love MindFusion!

Posts: 10
Location: CANADA
Joined: Dec 10th, 2014
Re: Need help with DiagramLink.drawArrowhead()
Reply #2 - Jun 1st, 2015 at 1:43pm
Print Post  
Thank's a lot for your quick answer.  It could not be more simple than that...

By the way, we have been using jDiagram for about a year now and are really enjoying it.  And you've been providing great support as well, if only every company was like you!!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need help with DiagramLink.drawArrowhead()
Reply #3 - Jun 1st, 2015 at 3:59pm
Print Post  
You're welcome Cool
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint