private static void PerformTest(IPointToPathGeometryFactory factory) { var gpw = new WpfPathGeometryWriter(new IdentityPointTransformation(), factory); var res = gpw.ToShape(_multiPoint); WpfGeometryToImage(res, string.Format("WPF-Path-MultiPoint-{0}.png", factory.GetType().Name)); }
public void TestPolygonWithHoles() { const string wkt = "POLYGON((2 2, 2 98, 98 98, 98 2, 2 2), (5 90, 10 90, 10 95, 5 95, 5 90))"; var geom = new WKTReader().Read(wkt); var gpw = new WpfPathGeometryWriter(); var res = gpw.ToShape(geom); WpfGeometryToImage(res, "WPF-Path-PolygonWithHoles.png"); var reverse = WpfGeometryReader.Read(res, 0d, Geometries.GeometryFactory.Default); Assert.AreEqual(geom, reverse); }
public void TestPolygonWithHoles() { const string wkt = "POLYGON((2 2, 2 98, 98 98, 98 2, 2 2), (5 90, 10 90, 10 95, 5 95, 5 90))"; var geom = new WKTReader().Read(wkt); var gpw = new WpfPathGeometryWriter(); var res = gpw.ToShape(geom); WpfGeometryToImage(res, "WPF-Path-PolygonWithHoles.png"); var reverse = WpfGeometryReader.Read(res, 0d, GeometryFactory.Default); Assert.AreEqual(geom, reverse); }