public void Intersections_0() { IPath shape = new RectangularePolygon(1, 1, 10, 10); IEnumerable <PointF> intersections = shape.FindIntersections(new PointF(0, 5), new PointF(-5, 5)); Assert.Equal(0, intersections.Count()); }
public void ClippingEdgefromInside() { IPath simplePath = new RectangularePolygon(10, 10, 100, 100).Clip(new RectangularePolygon(20, 0, 20, 20)); IEnumerable <PointF> intersections = simplePath.FindIntersections(new PointF(float.MinValue, 20), new PointF(float.MaxValue, 20)); // returns an even number of points Assert.Equal(4, intersections.Count()); }