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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Sep 30 05:04:33 EDT 2010


Author: hubu
Date: 2010-09-30 09:04:33 +0000 (Thu, 30 Sep 2010)
New Revision: 5220

Modified:
   trunk/MgDev/Common/Stylization/StylizationEngine.cpp
Log:
On behalf of: Spark Liu
Fix the problem that when not totally opaque, text watermark always be black no matter what text color is.

This is because the original parse result of text color is stored in value, not defValue.
However, watermark uses value, which will always be black as the parse result.

Modified: trunk/MgDev/Common/Stylization/StylizationEngine.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2010-09-30 05:23:01 UTC (rev 5219)
+++ trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2010-09-30 09:04:33 UTC (rev 5220)
@@ -299,16 +299,16 @@
             if (textPri)
             {
                 // text needs to change color
-                textPri->textColor.value.argb      = textPri->textColor.defValue.argb      = TransparentColor(textPri->textColor.defValue.argb, opacity);
-                textPri->ghostColor.value.argb     = textPri->ghostColor.defValue.argb     = TransparentColor(textPri->ghostColor.defValue.argb, opacity);
-                textPri->frameLineColor.value.argb = textPri->frameLineColor.defValue.argb = TransparentColor(textPri->frameLineColor.defValue.argb, opacity);
-                textPri->frameFillColor.value.argb = textPri->frameFillColor.defValue.argb = TransparentColor(textPri->frameFillColor.defValue.argb, opacity);
+                textPri->textColor.value.argb      = textPri->textColor.defValue.argb      = TransparentColor(textPri->textColor.value.argb, opacity);
+                textPri->ghostColor.value.argb     = textPri->ghostColor.defValue.argb     = TransparentColor(textPri->ghostColor.value.argb, opacity);
+                textPri->frameLineColor.value.argb = textPri->frameLineColor.defValue.argb = TransparentColor(textPri->frameLineColor.value.argb, opacity);
+                textPri->frameFillColor.value.argb = textPri->frameFillColor.defValue.argb = TransparentColor(textPri->frameFillColor.value.argb, opacity);
             }
             else if (linePri)
             {
-                linePri->color.value.argb = linePri->color.defValue.argb = TransparentColor(linePri->color.defValue.argb, opacity);
+                linePri->color.value.argb = linePri->color.defValue.argb = TransparentColor(linePri->color.value.argb, opacity);
                 if (polygonPri)
-                    polygonPri->fill.value.argb = polygonPri->fill.defValue.argb = TransparentColor(polygonPri->fill.defValue.argb, opacity);
+                    polygonPri->fill.value.argb = polygonPri->fill.defValue.argb = TransparentColor(polygonPri->fill.value.argb, opacity);
             }
             else if (rasterPri)
             {



More information about the mapguide-commits mailing list