public void RenderPointsWithVectorStyle() { // arrange var map = VectorStyleSample.CreateMap(); const string fileName = "vector_symbol.png"; // act var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers, map.BackColor); // aside File.WriteToGeneratedFolder(fileName, bitmap); // assert Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap, 1, 0.99)); }
public void RenderPointsWithVectorStyle() { // arrange using var map = VectorStyleSample.CreateMap(); var viewport = map.Extent !.Multiply(3).ToViewport(200); const string fileName = "vector_symbol.png"; // act using var bitmap = new MapRenderer().RenderToBitmapStream(viewport, map.Layers, map.BackColor, 2); // aside File.WriteToGeneratedTestImagesFolder(fileName, bitmap); // assert Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap, 1, 0.99)); }
public void RenderPointsWithVectorStyle() { // arrange var map = VectorStyleSample.CreateMap(); var viewport = new Viewport { Center = new Point(100, 100), Width = 200, Height = 200, Resolution = 1 }; const string fileName = "vector_symbol.png"; // act var bitmap = new MapRenderer().RenderToBitmapStream(viewport, map.Layers, map.BackColor); // aside File.WriteToGeneratedFolder(fileName, bitmap); // assert Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap, 1, 0.99)); }