[mapserver-commits] r9433 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Oct 9 15:04:03 EDT 2009


Author: aboudreault
Date: 2009-10-09 15:04:02 -0400 (Fri, 09 Oct 2009)
New Revision: 9433

Modified:
   trunk/mapserver/mapagg.cpp
   trunk/mapserver/mapdraw.c
   trunk/mapserver/mapgd.c
   trunk/mapserver/mapimagemap.c
   trunk/mapserver/maplabel.c
   trunk/mapserver/mapserver.h
Log:
Renamed resolution factor variable name since it isn't related to the scale

Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/mapagg.cpp	2009-10-09 19:04:02 UTC (rev 9433)
@@ -1040,12 +1040,12 @@
         size = size*scalefactor;
     } else
         size = style->size*scalefactor;
-    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
-    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
+    size = MS_MAX(size, style->minsize*image->resolutionfactor);
+    size = MS_MIN(size, style->maxsize*image->resolutionfactor);
 
     width = style->width*scalefactor;
-    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
-    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    width = MS_MAX(width, style->minwidth*image->resolutionfactor);
+    width = MS_MIN(width, style->maxwidth*image->resolutionfactor);
 
     angle = (style->angle) ? style->angle : 0.0;
     angle_radians = angle*MS_DEG_TO_RAD;
@@ -1201,15 +1201,15 @@
         size = MS_NINT(size*scalefactor);
     } else
         size = MS_NINT(style->size*scalefactor);
-    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
-    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
+    size = MS_MAX(size, style->minsize*image->resolutionfactor);
+    size = MS_MIN(size, style->maxsize*image->resolutionfactor);
     if (symbol->sizey)
         d = size/symbol->sizey; /* compute the scaling factor (d) on the unrotated symbol */
     else
         d = 1;
     width = MS_NINT(style->width*scalefactor);
-    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
-    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    width = MS_MAX(width, style->minwidth*image->resolutionfactor);
+    width = MS_MIN(width, style->maxwidth*image->resolutionfactor);
     
     scalefactor = size / style->size;
     ox = style->offsetx*scalefactor;
@@ -1480,8 +1480,8 @@
   else
       size = style->size;
   label.size = size * scalefactor;
-  label.size = MS_MAX(label.size, style->minsize*image->resolution_scale_factor);
-  label.size = MS_MIN(label.size, style->maxsize*image->resolution_scale_factor);
+  label.size = MS_MAX(label.size, style->minsize*image->resolutionfactor);
+  label.size = MS_MIN(label.size, style->maxsize*image->resolutionfactor);
   scalefactor = label.size / size;
   gap = MS_MAX(MS_ABS(symbol->gap)*scalefactor,1);
 
@@ -1572,12 +1572,12 @@
         size = style->size;
 
     size = (size*scalefactor);
-    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
-    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
+    size = MS_MAX(size, style->minsize*image->resolutionfactor);
+    size = MS_MIN(size, style->maxsize*image->resolutionfactor);
 
     width = (style->width*scalefactor);
-    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
-    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    width = MS_MAX(width, style->minwidth*image->resolutionfactor);
+    width = MS_MIN(width, style->maxwidth*image->resolutionfactor);
     scalefactor = width/style->width;
 
 
@@ -1763,12 +1763,12 @@
         size = size*scalefactor;
     } else
         size = style->size*scalefactor;
-    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
-    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
+    size = MS_MAX(size, style->minsize*image->resolutionfactor);
+    size = MS_MIN(size, style->maxsize*image->resolutionfactor);
 
     width = style->width*scalefactor;
-    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
-    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    width = MS_MAX(width, style->minwidth*image->resolutionfactor);
+    width = MS_MIN(width, style->maxwidth*image->resolutionfactor);
     
     scalefactor = size / style->size;
 
@@ -1984,12 +1984,12 @@
         double size;
 
         size = label->size*scalefactor;
-        size = MS_MAX(size, label->minsize*image->resolution_scale_factor);
-        size = MS_MIN(size, label->maxsize*image->resolution_scale_factor);
+        size = MS_MAX(size, label->minsize*image->resolutionfactor);
+        size = MS_MIN(size, label->maxsize*image->resolutionfactor);
         scalefactor = size / label->size;
-        outlinewidth = label->outlinewidth*image->resolution_scale_factor;
-        shadowsizex = label->shadowsizex*image->resolution_scale_factor;
-        shadowsizey = label->shadowsizey*image->resolution_scale_factor;
+        outlinewidth = label->outlinewidth*image->resolutionfactor;
+        shadowsizex = label->shadowsizex*image->resolutionfactor;
+        shadowsizey = label->shadowsizey*image->resolutionfactor;
 
         if(!fontset) {
             msSetError(MS_TTFERR, "No fontset defined.", "msDrawTextAGG()");
@@ -2075,12 +2075,12 @@
         char s[11]; /* UTF-8 characters can be up to 6 bytes wide, entities 10 (ϑ) */
 
         size = label->size*scalefactor;
-        size = MS_MAX(size, label->minsize*image->resolution_scale_factor);
-        size = MS_MIN(size, label->maxsize*image->resolution_scale_factor);
+        size = MS_MAX(size, label->minsize*image->resolutionfactor);
+        size = MS_MIN(size, label->maxsize*image->resolutionfactor);
         scalefactor = size / label->size;
-        outlinewidth = label->outlinewidth*image->resolution_scale_factor;
-        shadowsizex = label->shadowsizex*image->resolution_scale_factor;
-        shadowsizey = label->shadowsizey*image->resolution_scale_factor;
+        outlinewidth = label->outlinewidth*image->resolutionfactor;
+        shadowsizex = label->shadowsizex*image->resolutionfactor;
+        shadowsizey = label->shadowsizey*image->resolutionfactor;
 
         if(!fontset) {
             msSetError(MS_TTFERR, "No fontset defined.", "msDrawTextLineAGG()");

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/mapdraw.c	2009-10-09 19:04:02 UTC (rev 9433)
@@ -1005,7 +1005,7 @@
                  */
                 
                 /* adapt width (must take scalefactor into account) */
-                pStyle->width += (pStyle->outlinewidth / (layer->scalefactor/image->resolution_scale_factor)) * 2;
+                pStyle->width += (pStyle->outlinewidth / (layer->scalefactor/image->resolutionfactor)) * 2;
                 pStyle->minwidth += pStyle->outlinewidth * 2;
                 pStyle->maxwidth += pStyle->outlinewidth * 2;
                 pStyle->size += (pStyle->outlinewidth/layer->scalefactor*(map->resolution/map->defresolution));
@@ -1026,7 +1026,7 @@
                  */
                 
                 /* reset widths to original state */
-                pStyle->width -= (pStyle->outlinewidth / (layer->scalefactor/image->resolution_scale_factor)) * 2;
+                pStyle->width -= (pStyle->outlinewidth / (layer->scalefactor/image->resolutionfactor)) * 2;
                 pStyle->minwidth -= pStyle->outlinewidth * 2;
                 pStyle->maxwidth -= pStyle->outlinewidth * 2;
                 pStyle->size -= (pStyle->outlinewidth/layer->scalefactor*(map->resolution/map->defresolution));

Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/mapgd.c	2009-10-09 19:04:02 UTC (rev 9433)
@@ -298,7 +298,7 @@
     image->imagepath = NULL;
     image->imageurl = NULL;
     image->resolution = resolution;
-    image->resolution_scale_factor = resolution/defresolution;
+    image->resolutionfactor = resolution/defresolution;
 
     if(imagepath) image->imagepath = strdup(imagepath);
     if(imageurl) image->imageurl = strdup(imageurl);

Modified: trunk/mapserver/mapimagemap.c
===================================================================
--- trunk/mapserver/mapimagemap.c	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/mapimagemap.c	2009-10-09 19:04:02 UTC (rev 9433)
@@ -331,7 +331,7 @@
             image->imagepath = NULL;
             image->imageurl = NULL;
             image->resolution = resolution;
-            image->resolution_scale_factor = resolution/defresolution;
+            image->resolutionfactor = resolution/defresolution;
 
 	    if( strcasecmp("ON",msGetOutputFormatOption( format, "DXF", "OFF" )) == 0){
 		    dxf = 1;

Modified: trunk/mapserver/maplabel.c
===================================================================
--- trunk/mapserver/maplabel.c	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/maplabel.c	2009-10-09 19:04:02 UTC (rev 9433)
@@ -779,8 +779,8 @@
     char *font=NULL;
 
     size = label->size*scalefactor;
-    size = MS_MAX(size, label->minsize*img->resolution_scale_factor);
-    size = MS_MIN(size, label->maxsize*img->resolution_scale_factor);
+    size = MS_MAX(size, label->minsize*img->resolutionfactor);
+    size = MS_MIN(size, label->maxsize*img->resolutionfactor);
     scalefactor = size / label->size;
     font = msLookupHashTable(&(fontset->fonts), label->font);
     if(!font) {

Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h	2009-10-09 13:07:50 UTC (rev 9432)
+++ trunk/mapserver/mapserver.h	2009-10-09 19:04:02 UTC (rev 9433)
@@ -1472,7 +1472,7 @@
 #endif
   int width, height;
   double resolution;
-  double resolution_scale_factor;
+  double resolutionfactor;
 
   char *imagepath, *imageurl;
 



More information about the mapserver-commits mailing list