[mapserver-commits] r10068 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Apr 7 14:38:46 EDT 2010


Author: aboudreault
Date: 2010-04-07 14:38:46 -0400 (Wed, 07 Apr 2010)
New Revision: 10068

Modified:
   trunk/mapserver/mapdraw.c
   trunk/mapserver/mapprimitive.c
Log:
Fixed a few things about the new anglemode system (#1688)

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2010-04-07 15:18:56 UTC (rev 10067)
+++ trunk/mapserver/mapdraw.c	2010-04-07 18:38:46 UTC (rev 10068)
@@ -1695,7 +1695,7 @@
               if(label.angle != 0)
                 label.angle -= map->gt.rotation_angle;
               
-              if(label.anglemode == MS_AUTO || label.anglemode == MS_AUTO2) label.angle = *angles[i];
+              if(label.anglemode != MS_NONE) label.angle = *angles[i];
               
               if(layer->labelcache) {
                 if(msAddLabel(map, layer->index, c, shape, annopoints[i], NULL, shape->text, *lengths[i], &label) != MS_SUCCESS) return(MS_FAILURE);
@@ -1734,7 +1734,7 @@
                 label.angle -= map->gt.rotation_angle;
               
               /* Angle derived from line overrides even the rotation value. */
-              if(label.anglemode == MS_AUTO || label.anglemode == MS_AUTO2) label.angle = *angles[i];
+              if(label.anglemode != MS_NONE) label.angle = *angles[i];
               
               if(layer->labelcache) {
                 if(msAddLabel(map, layer->index, c, shape, annopoints[i], NULL, shape->text, *lengths[i], &label) != MS_SUCCESS) return(MS_FAILURE);
@@ -2057,7 +2057,7 @@
             if(label.angle != 0)
               label.angle -= map->gt.rotation_angle;
             
-            if(label.anglemode == MS_AUTO || label.anglemode == MS_AUTO2) label.angle = *angles[i];
+            if(label.anglemode != MS_NONE) label.angle = *angles[i];
             
             if(layer->labelcache) {
               if(msAddLabel(map, layer->index, c, shape, annopoints[i], NULL, shape->text, *lengths[i], &label) != MS_SUCCESS) return(MS_FAILURE);
@@ -2092,7 +2092,7 @@
           if(label.angle != 0)
             label.angle -= map->gt.rotation_angle;
           
-          if(label.anglemode == MS_AUTO || label.anglemode == MS_AUTO2) label.angle = *angles[i];
+          if(label.anglemode != MS_NONE) label.angle = *angles[i];
           
           if(layer->labelcache) {
             if(msAddLabel(map, layer->index, c, shape, annopoints[i], NULL, shape->text, *lengths[i], &label) != MS_SUCCESS) return(MS_FAILURE);

Modified: trunk/mapserver/mapprimitive.c
===================================================================
--- trunk/mapserver/mapprimitive.c	2010-04-07 15:18:56 UTC (rev 10067)
+++ trunk/mapserver/mapprimitive.c	2010-04-07 18:38:46 UTC (rev 10068)
@@ -1465,8 +1465,7 @@
         *(*lengths)[index] = total_length;
 
       /* if there is only 1 label to place... put it in the middle of the current segment (as old behavior) */
-      if ( ((anglemode == MS_AUTO) || (anglemode == MS_AUTO2)) && 
-           (point_repeat == 1) )
+      if (anglemode != MS_NONE && (point_repeat == 1))
       {
         j = segment_index;
         (*labelpoints)[index]->x = (p->line[i].point[j].x + p->line[i].point[j-1].x)/2.0;



More information about the mapserver-commits mailing list