Пример #1
0
        public void RenderRotatedBitmapSymbolWithOffset()
        {
            // arrange
            var          map      = ArrangeRenderingTests.PointsWithBitmapRotatedAndOffset();
            const string fileName = "bitmap_symbol.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Пример #2
0
        public void RenderSymbolWithWorldUnits()
        {
            // arrange
            var          map      = ArrangeRenderingTests.PointsWithWorldUnits();
            const string fileName = "vector_symbol_unittype.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Пример #3
0
        public void RenderSymbolWithWorldUnits()
        {
            // arrange
            var          map      = ArrangeRenderingTests.PointsWithWorldUnits();
            const string fileName = "vector_symbol_unittype.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside
            File.Write(fileName, bitmap);

            // assert
            Assert.AreEqual(File.Read(fileName).ToArray(), bitmap.ToArray());
        }
Пример #4
0
        public void RenderLabels()
        {
            // arrange
            var          map      = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside;
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Пример #5
0
        public void RenderRotatedBitmapSymbolWithOffset()
        {
            // arrange
            var          map      = ArrangeRenderingTests.PointsWithBitmapRotatedAndOffset();
            const string fileName = "bitmap_symbol.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside
            File.Write(fileName, bitmap);

            // assert
            Assert.AreEqual(File.Read(fileName).ToArray(), bitmap.ToArray());
        }
Пример #6
0
        public void RenderLabels()
        {
            // arrange
            var          map      = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside;
            File.Write(fileName, bitmap);

            // assert
            Assert.AreEqual(File.Read(fileName).ToArray(), bitmap.ToArray());
        }
Пример #7
0
        public void RenderRotatedBitmapSymbolWithOffset()
        {
            // arrange
            var map = ArrangeRenderingTests.PointsWithBitmapRotatedAndOffset();
            const string fileName = "bitmap_symbol.png";
            // act
            var bitmap = RenderToBitmap(map);

#if !MONOGAME
            // aside
            if (Settings.Default.WriteToDisk) WriteFile(Path.Combine(_generatedImagesFolder, fileName), bitmap);

            // assert
            Assert.AreEqual(ReadFile(Path.Combine(_originalImagesFolder, fileName)), bitmap.ToArray());
#endif
        }
Пример #8
0
        public void RenderPointsWithDifferentSymbolTypes()
        {
            // arrange
            var map = ArrangeRenderingTests.PointsWithDifferentSymbolTypes();
            const string fileName = "vector_symbol_symboltype.png";
            
            // act
            var bitmap = RenderToBitmap(map);

#if !MONOGAME
            // aside
            if (Settings.Default.WriteToDisk) WriteFile(Path.Combine(_generatedImagesFolder, fileName), bitmap);

            // assert
            Assert.AreEqual(ReadFile(Path.Combine(_originalImagesFolder, fileName)), bitmap.ToArray());
#endif
        }
Пример #9
0
        public void RenderLabels()
        {
            // arrange
            var map = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = RenderToBitmap(map);

#if !MONOGAME
            // aside;
            if (Settings.Default.WriteToDisk) WriteFile(Path.Combine(_generatedImagesFolder, fileName), bitmap);

            // assert
            Assert.AreEqual(ReadFile(Path.Combine(_originalImagesFolder, fileName)), bitmap.ToArray());
#endif
        }
Пример #10
0
        public void RenderPointWithBitmapSymbols()
        {
            // arrange
            var          map      = ArrangeRenderingTests.PointsWithBitmapSymbols();
            const string fileName = "points_with_symbolstyle.png";

            // act
            var bitmap = RenderToBitmap(map);

#if !MONOGAME
            // aside
            if (Rendering.Default.WriteImageToDisk)
            {
                WriteFile(Path.Combine(_generatedImagesFolder, fileName), bitmap);
            }

            // assert
            Assert.AreEqual(ReadFile(Path.Combine(_originalImagesFolder, fileName)), bitmap.ToArray());
#endif
        }