hitTest method
Picking with a caller tolerance. Closed outlines pick their interior only;
stroke-like outlines widen their stroke to tolerance instead of the
fixed diagramStrokeHitTolerance used by contains.
Implementation
@override
bool hitTest(DiagramPoint point, {required double tolerance}) =>
(closed && pointInPolygon(point, points)) ||
_nearPolyline(point, points, tolerance);