public void LienearSegements() { IPath shape = new RectangularPolygon(10, 11, 12, 13).AsPath(); var segemnts = shape.Flatten().ToArray()[0].Points; Assert.Equal(new PointF(10, 11), segemnts[0]); Assert.Equal(new PointF(22, 11), segemnts[1]); Assert.Equal(new PointF(22, 24), segemnts[2]); Assert.Equal(new PointF(10, 24), segemnts[3]); }
public void Create_FromRecangle() { var polygon = new RectangularPolygon(10, 20, 100, 50); PointF[] points = polygon.Flatten().Single().Points.Span.ToArray(); using var multipolygon = TessellatedMultipolygon.Create(polygon, MemoryAllocator); VerifyRing(multipolygon[0], points, true, false); Assert.Equal(4, multipolygon.TotalVertexCount); }