[mapserver-commits] r7153 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Dec 7 03:58:13 EST 2007


Author: tbonfort
Date: 2007-12-07 03:58:12 -0500 (Fri, 07 Dec 2007)
New Revision: 7153

Modified:
   trunk/mapserver/mapdraw.c
Log:
don't compute billboard if label isn't going to be drawn (on the correct file this time :( )

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2007-12-07 08:52:00 UTC (rev 7152)
+++ trunk/mapserver/mapdraw.c	2007-12-07 08:58:12 UTC (rev 7153)
@@ -2073,8 +2073,6 @@
                                 cachePtr->status = MS_TRUE; /* assume label *can* be drawn */
 
                                 p = get_metrics(&(cachePtr->point), pos, r, (marker_offset_x + labelPtr->offsetx), (marker_offset_y + labelPtr->offsety), labelPtr->angle, labelPtr->buffer, cachePtr->poly);
-                                if(MS_VALID_COLOR(labelPtr->backgroundcolor))
-                                    get_metrics_line(&(cachePtr->point), pos, r, (marker_offset_x + labelPtr->offsetx), (marker_offset_y + labelPtr->offsety), labelPtr->angle, 1, billboard.line);
                                 if(layerPtr->type == MS_LAYER_ANNOTATION && cachePtr->numstyles > 0)
                                     msRectToPolygon(marker_rect, cachePtr->poly); /* save marker bounding polygon */
 
@@ -2082,8 +2080,11 @@
                                 msTestLabelCacheCollisions(&(map->labelcache), labelPtr, image->width, image->height, 
                                         labelPtr->buffer + map_edge_buffer, cachePtr, priority, l);
 
-                                if(cachePtr->status) /* found a suitable place for this label */
+                                if(cachePtr->status) /* found a suitable place for this label */ {
+                                    if(MS_VALID_COLOR(labelPtr->backgroundcolor))
+                                        get_metrics_line(&(cachePtr->point), pos, r, (marker_offset_x + labelPtr->offsetx), (marker_offset_y + labelPtr->offsety), labelPtr->angle, 1, billboard.line);                                          
                                     break;
+                                }
 
                             } /* next position */
 



More information about the mapserver-commits mailing list