public override bool HitTest(PointF point)
        {
            if (Points.Count < 2)
            {
                return(false);
            }

            for (int i = 0; i < Points.Count; i++)
            {
                if (i == 0)
                {
                    continue;
                }

                if (CanvasMath.PointOnLine(Points[i], Points[i - 1], point, Width))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #2
0
 public override bool HitTest(PointF point)
 {
     return(CanvasMath.PointOnLine(Pos, PosEnd, point, Width));
 }