Ejemplo n.º 1
0
        public void RenderPointWithSvgSymbols()
        {
            // arrange
            using var map = SvgSymbolSample.CreateMap();
            var          viewport = map.Extent !.Multiply(3).ToViewport(200);
            const string fileName = "points_with_svgsymbolstyle.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));
        }
Ejemplo n.º 2
0
        public void RenderPointWithSvgSymbols()
        {
            // arrange
            var map      = SvgSymbolSample.CreateMap();
            var viewport = new Viewport
            {
                Center     = new Point(100, 100),
                Width      = 200,
                Height     = 200,
                Resolution = 1
            };
            const string fileName = "points_with_svgsymbolstyle.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));
        }