You just need to use a different method for hit-testing: IsOutlineVisible
instead of IsVisible
.
using (var path = new GraphicsPath())
{
path.AddLines(myPoints);
return path.IsOutlineVisible(pt, Pens.Black);
}
You need to provide a pen because line-based hit-testing works with line and lines can have a specific width. That said I'd suggest to use a different (thicker) pen from what you use for drawing because to pick a single pixel with mouse isn't such easy for many many users.