[mapserver-commits] r7834 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Jul 29 13:40:31 EDT 2008


Author: dmorissette
Date: 2008-07-29 13:40:28 -0400 (Tue, 29 Jul 2008)
New Revision: 7834

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogr.cpp
Log:
Add support for TTF symbol angle and outline color in TAB files through 
STYLEITEM AUTO (#2721)


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-07-29 03:51:35 UTC (rev 7833)
+++ trunk/mapserver/HISTORY.TXT	2008-07-29 17:40:28 UTC (rev 7834)
@@ -12,8 +12,8 @@
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
 
-- Several enhancements to STYLEITEM AUTO support for labels in OGR
-  layers (#2708)
+- Several enhancements to STYLEITEM AUTO support for labels (#2708) and
+  TTF symbols (#2721) in OGR layers 
 
 
 Version 5.2.0 (2008-07-16):

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2008-07-29 03:51:35 UTC (rev 7833)
+++ trunk/mapserver/mapogr.cpp	2008-07-29 17:40:28 UTC (rev 7834)
@@ -2660,6 +2660,21 @@
                   MS_INIT_COLOR(c->styles[0]->color, r, g, b);
               }
 
+#if GDAL_VERSION_NUM >= 1600              
+              pszColor = OGR_ST_GetParamStr(hSymbolStyle,
+                                            OGRSTSymbolOColor,
+                                            &bIsNull);
+              if (!bIsNull && OGR_ST_GetRGBFromString(hSymbolStyle,
+                                                      pszColor,
+                                                      &r, &g, &b, &t))
+              {
+                  MS_INIT_COLOR(c->styles[0]->outlinecolor, r, g, b);
+              }
+#endif /* GDAL_VERSION_NUM >= 1600 */
+              c->styles[0]->angle = OGR_ST_GetParamNum(hSymbolStyle,
+                                                       OGRSTSymbolAngle,
+                                                       &bIsNull);
+              
               c->styles[0]->size = OGR_ST_GetParamNum(hSymbolStyle, 
                                                       OGRSTSymbolSize, 
                                                       &bIsNull);
@@ -2695,6 +2710,8 @@
                   MS_INIT_COLOR(c->styles[0]->color, r, g, b);
               }
 
+              c->styles[0]->angle = poSymbolStyle->Angle(bIsNull);
+                  
               c->styles[0]->size = (int)poSymbolStyle->Size(bIsNull);
 
               // Symbol name mapping:



More information about the mapserver-commits mailing list