[mapserver-commits] r9191 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Jul 21 09:44:43 EDT 2009


Author: aboudreault
Date: 2009-07-21 09:44:41 -0400 (Tue, 21 Jul 2009)
New Revision: 9191

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogr.cpp
Log:
Modified STYLEITEM code to use the new way of rendering thick lines (#3025)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-07-20 18:23:49 UTC (rev 9190)
+++ trunk/mapserver/HISTORY.TXT	2009-07-21 13:44:41 UTC (rev 9191)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Modified STYLEITEM code to use the new way of rendering thick lines (#3025)
+
 - Fixed template processor to respect layer order. (#2619)
 
 - Add MS_DEBUGLEVEL and MS_ERRORFILE commandline switches for mapserv.c. 

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2009-07-20 18:23:49 UTC (rev 9190)
+++ trunk/mapserver/mapogr.cpp	2009-07-21 13:44:41 UTC (rev 9191)
@@ -2985,18 +2985,11 @@
                                                 OGRSTPenWidth, &bIsNull);
                   if (bIsNull)
                       nPenSize = 1;
-                  if (pszPenName!=NULL || nPenSize > 1)
+                  if (pszPenName!=NULL)
                   {
-                      // Thick line or patterned line style
-                      //
-                      // First try to match pen name in symbol file
-                      // If not found then look for a "default-circle" symbol
-                      // that we'll use for producing thick lines.  
-                      // Otherwise symbol will be set to 0 and line will 
-                      // be 1 pixel wide.
+                      // Try to match pen name in symbol file
                       nPenSymbol = msOGRGetSymbolId(&(map->symbolset),
-                                                    pszPenName, 
-                                           (nPenSize>1)?"default-circle":NULL);
+                                                    pszPenName, NULL);
                   }
               }
               if (layer->debug >= MS_DEBUGLEVEL_VVV)
@@ -3014,6 +3007,7 @@
                   c->styles[1]->outlinecolor = oPenColor;
                   c->styles[1]->size = nPenSize;
                   c->styles[1]->symbol = nPenSymbol;
+                  c->styles[1]->width = nPenSize;
               }
               else
               {
@@ -3031,6 +3025,7 @@
                       c->styles[0]->color = oPenColor;
                   c->styles[0]->symbol = nPenSymbol;
                   c->styles[0]->size = nPenSize;
+                  c->styles[0]->width = nPenSize;
               }
 
           }
@@ -3067,18 +3062,11 @@
                   nPenSize = (int)poPenStyle->Width(bIsNull);
                   if (bIsNull)
                       nPenSize = 1;
-                  if (pszPenName!=NULL || nPenSize > 1)
+                  if (pszPenName!=NULL)
                   {
-                      // Thick line or patterned line style
-                      //
-                      // First try to match pen name in symbol file
-                      // If not found then look for a "default-circle" symbol
-                      // that we'll use for producing thick lines.  
-                      // Otherwise symbol will be set to 0 and line will 
-                      // be 1 pixel wide.
+                      // Try to match pen name in symbol file
                       nPenSymbol = msOGRGetSymbolId(&(map->symbolset),
-                                                    pszPenName, 
-                                           (nPenSize>1)?"default-circle":NULL);
+                                                    pszPenName, NULL);
                   }
               }
               if (layer->debug >= MS_DEBUGLEVEL_VVV)
@@ -3096,6 +3084,7 @@
                   c->styles[1]->outlinecolor = oPenColor;
                   c->styles[1]->size = nPenSize;
                   c->styles[1]->symbol = nPenSymbol;
+                  c->styles[1]->width = nPenSize;
               }
               else
               {
@@ -3113,6 +3102,7 @@
                       c->styles[0]->color = oPenColor;
                   c->styles[0]->symbol = nPenSymbol;
                   c->styles[0]->size = nPenSize;
+                  c->styles[0]->width = nPenSize;
               }
 
           }



More information about the mapserver-commits mailing list