Arrow of an edge


I'm using rectangles as nodes. Somehow the Calculation of the placement of the an arrow seems to be wrong. Whenever an edge is intersecting with the port of my rectangle near the corner the arrow is misplaced (see the red edge an the corresponding red arrow in my attachment).

file attachments


bog1978 wrote Mar 12, 2010 at 2:08 PM

Can you attach your graph definition file? I will use it as test.

saxifraga wrote Mar 15, 2010 at 11:51 AM

I've attached a graph-file as an exemple, but I'm afraid it will be quite hard for you to use it as a test, because as mentioned before I'm using rectangles as Nodes. They are about 340 px wide (330 width + 10 margin) and 140 px high (130 height + 10 margin). Hope that helps and you can fix this issue ;)

wrote Mar 15, 2010 at 11:51 AM

bog1978 wrote Mar 16, 2010 at 10:11 AM

I tested you graph with ellipse nodes and it looks fine. But i have a suggestion about your issue. There is a method in DrawingGraphNode:
public Point2D GetShapePort(Point2D point)
The input parameter is point outside the node. Return value is a point on the border of node and on the line connecting input point and center of node. For rectangle shape you must rewrite this method. Also ensure that input point is outside the node.

saxifraga wrote Mar 17, 2010 at 12:40 PM

I already found the method mentioned, but I just redirected the call to the method "public Point2D GetRectPort(Point2D point)". Since this method is already implemented and I thought the calculations were correct I just used it ;) I also ensured that the input point is outside, however there are some troubles with the arrows.

bog1978 wrote Mar 17, 2010 at 8:41 PM

You can send me your zipped solution and test graph to bog1978@mail.ru. I will try to find the bug.

wrote Feb 13, 2013 at 11:13 PM