Exemplo n.º 1
0
        public static PointF FindIntersection(AESegment segArea, AESegment track)
        {
            PointF intersection;

            if (track.isCurved)
            {
                if ((int)(track.startPoint.X) == 45892)
                {
                    intersection = PointF.Empty;
                }
                intersection = DrawUtility.FindCurveIntersection(segArea, track);
            }
            else
            {
                intersection = DrawUtility.FindStraightIntersection(segArea, track);
            }
            return(intersection);
        }
Exemplo n.º 2
0
        public bool PointOnSegment(PointF toCheck)
        {
            PointF closest;
            double dist;

            if (!isCurved)
            {
                dist = DrawUtility.FindDistanceToSegment(toCheck, this, out closest);
            }
            else
            {
                dist = DrawUtility.FindDistanceToCurve(toCheck, this, out closest);
            }
            if (Math.Round(dist, 2) != 0.0)
            {
                return(false);
            }
            return(true);
        }