I’d like to have a GoPickInRectangleStyle for my GoToolRubberBanding that behaves slightly like SelectableOnlyIntersectsBounds, ie that only partially selecting an object should select it.
The main difference is that I don’t care much about the object boundind box, especially in case of links: In the case of a 45° link, it is quite easy to intersect the bounding box without ever knowing it…
Is there any way to make this tool for link use the link stroke (I currently only use straight links) instead of the link bounding box?
There’s no easy way to do this.
But you could implement a replacement for GoView.SelectInRectangle to do exactly what you want. You can either override that method on GoView, or you can replace the call to that method in GoToolRubberBanding.DoRubberBand:
public virtual void DoRubberBand(Rectangle box) { if (!IsBeyondDragSize()) { DoSelect(this.LastInput); // whether or not we found and/or selected anything, call DoClick DoClick(this.LastInput); } else { RectangleF docRect = this.View.ConvertViewToDoc(box); this.View.SelectInRectangle(docRect); } }