Hi,
I have a links which are derived from a GoLableLink.I want to find the center of the link. RealLink.Center property shows the center between the two connecting nodes and not the exact center of the link. SOmetime this center get positioned outside the link. Can you please suggest me the way to find the exact center of the Link. Link is Orthogonal type.
Regards
Amit
Could you specify more precisely what you mean by “center”?
If you are looking for the midpoint as the point halfway along the length of the stroke, then you can calculate this by measuring the lengths of each segment. You’ll need to iterate over the points of the stroke by calling GoLink.GetPoint(i) for i from 0 to GoLink.PointsCount-1.
I don’t know if you can see the image I send.On the diagram canavas I have 10 links. Now I want to highlight that links by placing a elliptical node on each link. The problem is that I want to place it on exact center on the each link now I want some mechanism to find out the center of the each link. I tried it out using the getPoints() but it doesn’t work. Can you suggest something on this?
Thanks
Amit
(No, I think no one can see your image.)
If you use a GoLabeledLink, you can set the MidLabel object to be a GoEllipse of the size you want.