[mapserver-commits] r9380 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Mon Oct 5 15:37:33 EDT 2009


Author: aboudreault
Date: 2009-10-05 15:37:31 -0400 (Mon, 05 Oct 2009)
New Revision: 9380

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapdraw.c
Log:
Backport in 5.4: Fixed use of minfeaturesize auto with curved labels (#3151)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-10-05 17:25:12 UTC (rev 9379)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-10-05 19:37:31 UTC (rev 9380)
@@ -14,6 +14,8 @@
 Current Version:
 ----------------
 
+- Fixed use of minfeaturesize auto with curved labels (#3151)
+
 - Useful error message for case where PK is missing and data is 
   subselect (#3124)
 

Modified: branches/branch-5-4/mapserver/mapdraw.c
===================================================================
--- branches/branch-5-4/mapserver/mapdraw.c	2009-10-05 17:25:12 UTC (rev 9379)
+++ branches/branch-5-4/mapserver/mapdraw.c	2009-10-05 19:37:31 UTC (rev 9380)
@@ -1517,7 +1517,7 @@
           labelObj label = layer->class[c]->label;
           
           if(layer->labelcache) {
-            if(msAddLabel(map, layer->index, c, shape, NULL, annopath, shape->text, length, &label) != MS_SUCCESS) return(MS_FAILURE);
+            if(msAddLabel(map, layer->index, c, shape, NULL, annopath, shape->text, -1, &label) != MS_SUCCESS) return(MS_FAILURE);
           } else {
             /* FIXME: Not sure how this should work with the label path yet */
             /*
@@ -1799,7 +1799,7 @@
           labelObj label = layer->class[c]->label;
 
           if(layer->labelcache) {
-            if(msAddLabel(map, layer->index, c, shape, NULL, annopath, shape->text, length, &label) != MS_SUCCESS) return(MS_FAILURE);
+            if(msAddLabel(map, layer->index, c, shape, NULL, annopath, shape->text, -1, &label) != MS_SUCCESS) return(MS_FAILURE);
           } else {
             /* FIXME: need to call msDrawTextLineGD() from here eventually */
             /* msDrawLabel(image, label_line->point[0], shape->text, &label, &map->fontset, layer->scalefactor); */
@@ -2359,7 +2359,8 @@
 
           if(msGetLabelSize(image,cachePtr->text, labelPtr, &r, &(map->fontset), layerPtr->scalefactor, MS_TRUE,NULL) == -1)
             return(-1);
-          if(labelPtr->autominfeaturesize && ((r.maxx-r.minx) > cachePtr->featuresize))
+          /* if cachePtr->featuresize is set to -1, this check has been done in msPolylineLabelPath() */
+          if(labelPtr->autominfeaturesize && (cachePtr->featuresize != -1) && ((r.maxx-r.minx) > cachePtr->featuresize))
             continue; /* label too large relative to the feature */
 
           marker_offset_x = marker_offset_y = 0; /* assume no marker */



More information about the mapserver-commits mailing list