Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Re: CustomDraw? (Read 1537 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CustomDraw?
Nov 4th, 2008 at 4:14pm
Print Post  
Hi,

You could use Graphics members such as DrawString and DrawLine to draw text and arrowheads. If you only need thicker lines, you might try setting a larger DiagramLink.Pen.Width instead of custom-drawing.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CustomDraw?
Reply #1 - Nov 5th, 2008 at 8:04am
Print Post  
The arrowheads are aligned to the tangent lines at the links end points, which are vertical when the internal control points of the Bezier links are exactly above the end point. You might modify the code that sets the links control point coordinates to offset the internal points horizontally towards each other, inversely proportional to their height. That's it if you are using the code from the previous thread where h denotes the height, try adding say 100/h to the left point's X and subtracting it from the right point's X.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CustomDraw?
Reply #2 - Nov 5th, 2008 at 3:44pm
Print Post  
What I suggested was to add/subtract res from points 1&2: you should have the X coordinates of points 1&2 different than the X coordinates of points 0&3 in order to change the arrowhead angles.

Now if you also need to pull the link ends apart, that should be based not only on their height, but also on the number of link incident to a node. You can divide the node's width by the number of links to find the point positions, then set the incoming link ends to the left-most points and the outgoing links to the right-most point. If you sort each group by the links' height, the links won't overlap.

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