[mapguide-commits] r7579 - in trunk/MgDev: Server/src/UnitTesting UnitTest/TestData/MappingService

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jun 7 06:30:21 PDT 2013


Author: jng
Date: 2013-06-07 06:30:21 -0700 (Fri, 07 Jun 2013)
New Revision: 7579

Modified:
   trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp
   trunk/MgDev/UnitTest/TestData/MappingService/UT_RotatedPointStyles.ldf
Log:
#2284: Update the test case to also render 0 rotation icons so we have the baseline to compare rotated results against.

Modified: trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp	2013-06-07 11:36:19 UTC (rev 7578)
+++ trunk/MgDev/Server/src/UnitTesting/TestMappingService.cpp	2013-06-07 13:30:21 UTC (rev 7579)
@@ -788,83 +788,123 @@
 
         Ptr<MgByteReader> rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 0);
         Ptr<MgByteSink> sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_45_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_0_16x16.png");
         
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 1);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_25_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_45_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 2);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_45_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_25_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 3);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_25_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_0_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 4);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_45_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_45_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 5);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_25_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_25_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 6);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_45_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_0_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 7);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_25_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_45_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 8);
         sink = new MgByteSink(rdr);
-        sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_45_16x16.png");
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_25_16x16.png");
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 9);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_0_16x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 10);
+        sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_45_16x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 11);
+        sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_25_16x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 12);
+        sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_0_16x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 13);
+        sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_45_16x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 16, 16, MgImageFormats::Png, 1, 14);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_25_16x16.png");
 
         //Now try 32x16 to see if the rotation handling is acceptable with non-square sizes
 
         rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 0);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_0_32x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 1);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_45_32x16.png");
         
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 1);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 2);
         sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Square_25_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 2);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 3);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_0_32x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 4);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_45_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 3);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 5);
         sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Star_25_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 4);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 6);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_0_32x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 7);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_45_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 5);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 8);
         sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Triangle_25_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 6);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 9);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_0_32x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 10);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_45_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 7);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 11);
         sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_Cross_25_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 8);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 12);
         sink = new MgByteSink(rdr);
+        sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_0_32x16.png");
+
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 13);
+        sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_45_32x16.png");
 
-        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 9);
+        rdr = m_svcMapping->GenerateLegendImage(ldfId, 1000.0, 32, 16, MgImageFormats::Png, 1, 14);
         sink = new MgByteSink(rdr);
         sink->ToFile(L"../UnitTestFiles/RotatedPoint_XMark_25_32x16.png");
     }

Modified: trunk/MgDev/UnitTest/TestData/MappingService/UT_RotatedPointStyles.ldf
===================================================================
--- trunk/MgDev/UnitTest/TestData/MappingService/UT_RotatedPointStyles.ldf	2013-06-07 11:36:19 UTC (rev 7578)
+++ trunk/MgDev/UnitTest/TestData/MappingService/UT_RotatedPointStyles.ldf	2013-06-07 13:30:21 UTC (rev 7579)
@@ -10,6 +10,30 @@
         <DisplayAsText>false</DisplayAsText>
         <AllowOverpost>false</AllowOverpost>
         <PointRule>
+          <LegendLabel>0 degree square</LegendLabel>
+          <PointSymbolization2D>
+            <Mark>
+              <Unit>Points</Unit>
+              <SizeContext>DeviceUnits</SizeContext>
+              <SizeX>10</SizeX>
+              <SizeY>10</SizeY>
+              <Rotation>0</Rotation>
+              <Shape>Square</Shape>
+              <Fill>
+                <FillPattern>Solid</FillPattern>
+                <ForegroundColor>ffffffff</ForegroundColor>
+                <BackgroundColor>ffffffff</BackgroundColor>
+              </Fill>
+              <Edge>
+                <LineStyle>Solid</LineStyle>
+                <Thickness>1</Thickness>
+                <Color>ff000000</Color>
+                <Unit>Points</Unit>
+              </Edge>
+            </Mark>
+          </PointSymbolization2D>
+        </PointRule>
+        <PointRule>
           <LegendLabel>45 degree square</LegendLabel>
           <PointSymbolization2D>
             <Mark>
@@ -58,6 +82,30 @@
           </PointSymbolization2D>
         </PointRule>
         <PointRule>
+          <LegendLabel>0 degree star</LegendLabel>
+          <PointSymbolization2D>
+            <Mark>
+              <Unit>Points</Unit>
+              <SizeContext>DeviceUnits</SizeContext>
+              <SizeX>10</SizeX>
+              <SizeY>10</SizeY>
+              <Rotation>0</Rotation>
+              <Shape>Star</Shape>
+              <Fill>
+                <FillPattern>Solid</FillPattern>
+                <ForegroundColor>ffffffff</ForegroundColor>
+                <BackgroundColor>ffffffff</BackgroundColor>
+              </Fill>
+              <Edge>
+                <LineStyle>Solid</LineStyle>
+                <Thickness>1</Thickness>
+                <Color>ff000000</Color>
+                <Unit>Points</Unit>
+              </Edge>
+            </Mark>
+          </PointSymbolization2D>
+        </PointRule>
+        <PointRule>
           <LegendLabel>45 degree star</LegendLabel>
           <PointSymbolization2D>
             <Mark>
@@ -106,6 +154,30 @@
           </PointSymbolization2D>
         </PointRule>
         <PointRule>
+          <LegendLabel>0 degree triangle</LegendLabel>
+          <PointSymbolization2D>
+            <Mark>
+              <Unit>Points</Unit>
+              <SizeContext>DeviceUnits</SizeContext>
+              <SizeX>10</SizeX>
+              <SizeY>10</SizeY>
+              <Rotation>0</Rotation>
+              <Shape>Triangle</Shape>
+              <Fill>
+                <FillPattern>Solid</FillPattern>
+                <ForegroundColor>ffffffff</ForegroundColor>
+                <BackgroundColor>ffffffff</BackgroundColor>
+              </Fill>
+              <Edge>
+                <LineStyle>Solid</LineStyle>
+                <Thickness>1</Thickness>
+                <Color>ff000000</Color>
+                <Unit>Points</Unit>
+              </Edge>
+            </Mark>
+          </PointSymbolization2D>
+        </PointRule>
+        <PointRule>
           <LegendLabel>45 degree triangle</LegendLabel>
           <PointSymbolization2D>
             <Mark>
@@ -154,6 +226,30 @@
           </PointSymbolization2D>
         </PointRule>
         <PointRule>
+          <LegendLabel>0 degree cross</LegendLabel>
+          <PointSymbolization2D>
+            <Mark>
+              <Unit>Points</Unit>
+              <SizeContext>DeviceUnits</SizeContext>
+              <SizeX>10</SizeX>
+              <SizeY>10</SizeY>
+              <Rotation>0</Rotation>
+              <Shape>Cross</Shape>
+              <Fill>
+                <FillPattern>Solid</FillPattern>
+                <ForegroundColor>ffffffff</ForegroundColor>
+                <BackgroundColor>ffffffff</BackgroundColor>
+              </Fill>
+              <Edge>
+                <LineStyle>Solid</LineStyle>
+                <Thickness>1</Thickness>
+                <Color>ff000000</Color>
+                <Unit>Points</Unit>
+              </Edge>
+            </Mark>
+          </PointSymbolization2D>
+        </PointRule>
+        <PointRule>
           <LegendLabel>45 degree cross</LegendLabel>
           <PointSymbolization2D>
             <Mark>
@@ -202,6 +298,30 @@
           </PointSymbolization2D>
         </PointRule>
         <PointRule>
+          <LegendLabel>0 degree X</LegendLabel>
+          <PointSymbolization2D>
+            <Mark>
+              <Unit>Points</Unit>
+              <SizeContext>DeviceUnits</SizeContext>
+              <SizeX>10</SizeX>
+              <SizeY>10</SizeY>
+              <Rotation>0</Rotation>
+              <Shape>X</Shape>
+              <Fill>
+                <FillPattern>Solid</FillPattern>
+                <ForegroundColor>ffffffff</ForegroundColor>
+                <BackgroundColor>ffffffff</BackgroundColor>
+              </Fill>
+              <Edge>
+                <LineStyle>Solid</LineStyle>
+                <Thickness>1</Thickness>
+                <Color>ff000000</Color>
+                <Unit>Points</Unit>
+              </Edge>
+            </Mark>
+          </PointSymbolization2D>
+        </PointRule>
+        <PointRule>
           <LegendLabel>45 degree X</LegendLabel>
           <PointSymbolization2D>
             <Mark>



More information about the mapguide-commits mailing list