private static void PrepareForMidPointRemoval(IndexOfList vertices, ref int index1, ref int index2) { // where we need to wrap around the bounds in forwards, we need to make the section being retained contiguous, // or the vertexes aren't added in the right order vertices.AddRange(vertices.Take(index1 + 1)); vertices.RemoveRange(0, index1 + 1); index2 -= index1 + 1; index1 = vertices.Count - 1; }
public PolygonF(params PointF[] points) { Vertices = new IndexOfList(points); Area = CalculateArea(Vertices); }