[mapserver-commits] r11277 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Mar 18 16:24:28 EDT 2011


Author: tbonfort
Date: 2011-03-18 13:24:28 -0700 (Fri, 18 Mar 2011)
New Revision: 11277

Modified:
   trunk/mapserver/mapfile.c
   trunk/mapserver/mapogcsld.c
Log:
add PATTERN to writeMap()
use floating point values for sld dashes
use butt caps for sld dashes

Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c	2011-03-18 20:12:56 UTC (rev 11276)
+++ trunk/mapserver/mapfile.c	2011-03-18 20:24:28 UTC (rev 11277)
@@ -2703,6 +2703,18 @@
     writeAttributeBinding(stream, indent, "OUTLINEWIDTH", &(style->bindings[MS_STYLE_BINDING_OUTLINEWIDTH]));
   else writeNumber(stream, indent, "OUTLINEWIDTH", 0, style->outlinewidth);
 
+  /* PATTERN */
+  if(style->patternlength != 0) {
+     int i;
+     indent++;
+     writeBlockBegin(stream,indent,"PATTERN");
+     for(i=0;i<style->patternlength;i++)
+       fprintf(stream, " %.2f", style->pattern[i]);
+     fprintf(stream,"\n");
+     writeBlockEnd(stream,indent,"PATTERN");
+     indent--;
+  }
+
   if(style->numbindings > 0 && style->bindings[MS_STYLE_BINDING_SIZE].item)
     writeAttributeBinding(stream, indent, "SIZE", &(style->bindings[MS_STYLE_BINDING_SIZE]));
   else writeNumber(stream, indent, "SIZE", -1, style->size);

Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c	2011-03-18 20:12:56 UTC (rev 11276)
+++ trunk/mapserver/mapogcsld.c	2011-03-18 20:24:28 UTC (rev 11277)
@@ -1249,9 +1249,10 @@
                        {
                            psStyle->patternlength = nDash;
                            for (i=0; i<nDash; i++)
-                              psStyle->pattern[i] = atoi(aszValues[i]);
+                              psStyle->pattern[i] = atof(aszValues[i]);
 
                            msFreeCharArray(aszValues, nDash);
+                           psStyle->linecap = MS_CJC_BUTT;
                        }
                         
                     }



More information about the mapserver-commits mailing list