Links are selected based on bounds

I’m having a small problem in Go related to the selection of links.
There are cases (using GoToolRubberBanding) where selecting objects will add a link to the GoSelection because it’s bounds intersect the selection rectangle. No segment in the link, however, was intersected by the selection rectangle.
I’ve managed to overcome this problem by overridding SelectInRectangle on the view. I’m calling Go’s static internal method on GoObject IntersectsLineSegment() to perform this calculation on each segment of the link.
My question is why is this method internal? Is there a better way to filter out links who’s bounds have been intersected, but no segment of the link has been intersected?

They’re internal because they are little utility methods within the class, and there hasn’t been much demand for them (before this).



You could write your own line intersection code… it’s not too hard. here is one source: Fast 2D Line Intersection Algorithm - Math and Physics - Tutorials - GameDev.net



I’ll take a look at whether we can make more of these utility methods public.

Thanks!

It would be awesome if you could make that public.