[mapguide-commits] r8864 - trunk/MgDev/Common/Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 10 18:11:34 PST 2015


Author: hubu
Date: 2015-12-10 18:11:34 -0800 (Thu, 10 Dec 2015)
New Revision: 8864

Modified:
   trunk/MgDev/Common/Stylization/StylizationUtil.cpp
Log:
Fix #2579: Symbols are rotated with plot to HP printer landscape
https://trac.osgeo.org/mapguide/ticket/2579
This defect happens on Autodesk Map 3D. But it is an issue of Stylize Engine. The detail step is: 
1.Open Autodesk Map 3D 
2.Go into paper space and select a Landscape paper size 
3.Plot to an HP plotter 
Expected result: Drawing will plot the drawing as defined. 
Actual result: The symbols in the legend are rotated 90 degrees 

This issue only happens on point symbol. The reason is that Map 3D uses method tylizationUtil::RenderCompositeSymbolization?() to create the symbol in legend. I checked the implementation and found that this method doesn't account for the viewport rotation. The issue is fixed by add the viewport rotation. 

Modified: trunk/MgDev/Common/Stylization/StylizationUtil.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationUtil.cpp	2015-12-09 12:13:03 UTC (rev 8863)
+++ trunk/MgDev/Common/Stylization/StylizationUtil.cpp	2015-12-11 02:11:34 UTC (rev 8864)
@@ -707,6 +707,8 @@
 
                     // point usage rotation - assume geometry angle is zero
                     double angleRad = ptStyle->angleRad;
+                    // also account for any viewport rotation
+                    angleRad += pSERenderer->GetWorldToScreenRotation();
                     xformStyle.rotate(angleRad);
 
                     // symbol instance offset - must scale this by [S_mm], and [S_a]



More information about the mapguide-commits mailing list