[mapserver-commits] r12883 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Dec 12 05:26:32 EST 2011


Author: tbonfort
Date: 2011-12-12 02:26:31 -0800 (Mon, 12 Dec 2011)
New Revision: 12883

Modified:
   trunk/mapserver/maprendering.c
Log:
fix rendering of line markers when gap is larger than line length (#4120)



Modified: trunk/mapserver/maprendering.c
===================================================================
--- trunk/mapserver/maprendering.c	2011-12-12 09:37:28 UTC (rev 12882)
+++ trunk/mapserver/maprendering.c	2011-12-12 10:26:31 UTC (rev 12883)
@@ -342,7 +342,6 @@
       for(j=1; j<p->line[i].numpoints; j++)
       {
          double rx,ry,theta,length;
-         int in;
          length = sqrt((pow((p->line[i].point[j].x - p->line[i].point[j-1].x),2) + pow((p->line[i].point[j].y - p->line[i].point[j-1].y),2)));
          line_length += length;
          if(length==0)continue;
@@ -357,7 +356,6 @@
             else theta = -theta;
             style->rotation = original_rotation + theta;
          }
-         in = 0;
          while (current_length <= length) {
 
             point.x = p->line[i].point[j - 1].x + current_length * rx;
@@ -397,15 +395,10 @@
             if( ret != MS_SUCCESS)
                return ret;
             current_length += spacing;
-            in = 1;
             line_in=1;
          }
 
-         if (in)
-         {
-            current_length -= length;
-         }
-         else current_length -= length;
+         current_length -= length;
       }
 
       /* 
@@ -459,6 +452,7 @@
                   ret = renderer->renderTruetypeSymbol(image, point.x, point.y, symbol, style);
                   break;
                }
+               break; /* we have rendered the single marker for this line */
             }
             before_length += length;
          }



More information about the mapserver-commits mailing list