[mapserver-commits] r9432 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Oct 9 09:07:50 EDT 2009


Author: tbonfort
Date: 2009-10-09 09:07:50 -0400 (Fri, 09 Oct 2009)
New Revision: 9432

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapagg.cpp
   trunk/mapserver/mapdraw.c
   trunk/mapserver/mapgd.c
   trunk/mapserver/mapimagemap.c
   trunk/mapserver/maplabel.c
   trunk/mapserver/maplegend.c
   trunk/mapserver/mapogl.cpp
   trunk/mapserver/mappdf.c
   trunk/mapserver/mapscale.c
   trunk/mapserver/mapserv.c
   trunk/mapserver/mapserver.h
   trunk/mapserver/mapswf.c
   trunk/mapserver/maputil.c
   trunk/mapserver/mapwcs.c
Log:
 - make RFC55 highres output be friendly with scaledependant rendering (#3157)
 
 - avoid fractured and overlapping glyphs with angle follow (#2812


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/HISTORY.TXT	2009-10-09 13:07:50 UTC (rev 9432)
@@ -19,6 +19,10 @@
 Version 5.6.0-beta3 (2009-10-07):
 ---------------------------------
 
+- make RFC55 highres output be friendly with scaledependant rendering (#3157)
+
+- avoid fractured and overlapping glyphs with angle follow (#2812)
+
 - Fixed SDE layer seg fault (#3152)
 
 - Fixed placement of labels using ANGLE AUTO which were not always positioned 

Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapagg.cpp	2009-10-09 13:07:50 UTC (rev 9432)
@@ -848,7 +848,7 @@
 // Returns a pointer to a newly created imageObj structure.
 // a pointer to the AGG renderer is stored in the imageObj, used for caching
 // ----------------------------------------------------------------------
-imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution) 
+imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution, double defresolution) 
 {
     imageObj *pNewImage = NULL;
 
@@ -857,7 +857,7 @@
       return NULL;
     }
 
-    pNewImage = msImageCreateGD(width, height, format, imagepath, imageurl, resolution);
+    pNewImage = msImageCreateGD(width, height, format, imagepath, imageurl, resolution, defresolution);
     if(!pNewImage)
       return pNewImage;
 
@@ -1040,12 +1040,12 @@
         size = size*scalefactor;
     } else
         size = style->size*scalefactor;
-    size = MS_MAX(size, style->minsize);
-    size = MS_MIN(size, style->maxsize);
+    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
+    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
 
     width = style->width*scalefactor;
-    width = MS_MAX(width, style->minwidth);
-    width = MS_MIN(width, style->maxwidth);
+    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
+    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
 
     angle = (style->angle) ? style->angle : 0.0;
     angle_radians = angle*MS_DEG_TO_RAD;
@@ -1195,23 +1195,25 @@
     if(style->symbol >= symbolset->numsymbols || style->symbol < 0) return; /* no such symbol, 0 is OK   */
     symbolObj *symbol = symbolset->symbol[style->symbol];
 
-    ox = style->offsetx*scalefactor;
-    oy = style->offsety*scalefactor;
 
     if(style->size == -1) {
         size = msSymbolGetDefaultSize(symbolset->symbol[style->symbol]);
         size = MS_NINT(size*scalefactor);
     } else
         size = MS_NINT(style->size*scalefactor);
-    size = MS_MAX(size, style->minsize);
-    size = MS_MIN(size, style->maxsize);
+    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
+    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
     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);
-    width = MS_MIN(width, style->maxwidth);
+    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
+    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    
+    scalefactor = size / style->size;
+    ox = style->offsetx*scalefactor;
+    oy = style->offsety*scalefactor;
 
     angle = (style->angle) ? style->angle : 0.0;
     angle_radians = angle*MS_DEG_TO_RAD;
@@ -1477,12 +1479,11 @@
   }
   else
       size = style->size;
-  if(size*scalefactor > style->maxsize) scalefactor = (float)style->maxsize/(float)size;
-  if(size*scalefactor < style->minsize) scalefactor = (float)style->minsize/(float)size;
-  gap = MS_ABS(symbol->gap)* (int) scalefactor;
-  label.size = (size * scalefactor);
-  // label.minsize = style->minsize; 
-  // label.maxsize = style->maxsize; 
+  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);
+  scalefactor = label.size / size;
+  gap = MS_MAX(MS_ABS(symbol->gap)*scalefactor,1);
 
   label.color = style->color;
   label.outlinecolor = style->outlinecolor;
@@ -1571,13 +1572,15 @@
         size = style->size;
 
     size = (size*scalefactor);
-    size = MS_MAX(size, style->minsize);
-    size = MS_MIN(size, style->maxsize);
+    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
+    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
 
     width = (style->width*scalefactor);
-    width = MS_MAX(width, style->minwidth);
-    width = MS_MIN(width, style->maxwidth);
-    
+    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
+    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    scalefactor = width/style->width;
+
+
     ox = style->offsetx * scalefactor;
     oy = style->offsety * scalefactor;
 
@@ -1760,12 +1763,14 @@
         size = size*scalefactor;
     } else
         size = style->size*scalefactor;
-    size = MS_MAX(size, style->minsize);
-    size = MS_MIN(size, style->maxsize);
+    size = MS_MAX(size, style->minsize*image->resolution_scale_factor);
+    size = MS_MIN(size, style->maxsize*image->resolution_scale_factor);
 
     width = style->width*scalefactor;
-    width = MS_MAX(width, style->minwidth);
-    width = MS_MIN(width, style->maxwidth);
+    width = MS_MAX(width, style->minwidth*image->resolution_scale_factor);
+    width = MS_MIN(width, style->maxwidth*image->resolution_scale_factor);
+    
+    scalefactor = size / style->size;
 
     angle_radians = style->angle*MS_DEG_TO_RAD;
 
@@ -1979,11 +1984,12 @@
         double size;
 
         size = label->size*scalefactor;
-        size = MS_MAX(size, label->minsize);
-        size = MS_MIN(size, label->maxsize);
-        outlinewidth = label->outlinewidth;
-        shadowsizex = label->shadowsizex*scalefactor;
-        shadowsizey = label->shadowsizey*scalefactor;
+        size = MS_MAX(size, label->minsize*image->resolution_scale_factor);
+        size = MS_MIN(size, label->maxsize*image->resolution_scale_factor);
+        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;
 
         if(!fontset) {
             msSetError(MS_TTFERR, "No fontset defined.", "msDrawTextAGG()");
@@ -2069,11 +2075,12 @@
         char s[11]; /* UTF-8 characters can be up to 6 bytes wide, entities 10 (&thetasym;) */
 
         size = label->size*scalefactor;
-        size = MS_MAX(size, label->minsize);
-        size = MS_MIN(size, label->maxsize);
-        outlinewidth = label->outlinewidth;
-        shadowsizex = label->shadowsizex*scalefactor;
-        shadowsizey = label->shadowsizey*scalefactor;
+        size = MS_MAX(size, label->minsize*image->resolution_scale_factor);
+        size = MS_MIN(size, label->maxsize*image->resolution_scale_factor);
+        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;
 
         if(!fontset) {
             msSetError(MS_TTFERR, "No fontset defined.", "msDrawTextLineAGG()");
@@ -2091,9 +2098,30 @@
             return(-1);
         }
 
-        /* Iterate over the label line and draw each letter.*/
+        /* Iterate over the label line and draw each letter.
+         * first draw all the outlines and shadows*/
+        if(agg_ocolor.a || agg_scolor.a) {
+            string_ptr = string; 
+            for (i = 0; i < labelpath->path.numpoints; i++) {
+                double x, y;
+                double theta;
+                
+                if (msGetNextGlyph(&string_ptr, s) == -1)
+                        break;  /* Premature end of string??? */
+                
+                theta = labelpath->angles[i];
+                x = labelpath->path.point[i].x;
+                y = labelpath->path.point[i].y;
+
+                ren->renderGlyphs(x,y,AGG_NO_COLOR,agg_ocolor,
+                        size,font,s,theta,agg_scolor,
+                        shadowsizex,shadowsizey,
+                        outlinewidth);
+            }
+        }
+        
+        /* then draw the actual text */
         string_ptr = string; 
-
         for (i = 0; i < labelpath->path.numpoints; i++) {
             double x, y;
             double theta;
@@ -2105,8 +2133,8 @@
             x = labelpath->path.point[i].x;
             y = labelpath->path.point[i].y;
 
-            ren->renderGlyphs(x,y,agg_color,agg_ocolor,
-                    size,font,s,theta,agg_scolor,
+            ren->renderGlyphs(x,y,agg_color,AGG_NO_COLOR,
+                    size,font,s,theta,AGG_NO_COLOR,
                     shadowsizex,shadowsizey,
                     outlinewidth);
         }      

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapdraw.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -165,7 +165,7 @@
     else if( MS_RENDERER_GD(map->outputformat) )
     {
         image = msImageCreateGD(map->width, map->height, map->outputformat, 
-				map->web.imagepath, map->web.imageurl, map->resolution);        
+				map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
         if( image != NULL ) msImageInitGD( image, &map->imagecolor );
         msPreAllocateColorsGD(image, map);
     }
@@ -173,14 +173,14 @@
     else if( MS_RENDERER_AGG(map->outputformat) )
     {
         image = msImageCreateAGG(map->width, map->height, map->outputformat, 
-                                 map->web.imagepath, map->web.imageurl, map->resolution);        
+                                 map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
         if( image != NULL ) msImageInitAGG( image, &map->imagecolor );
     }
 #endif
     else if( MS_RENDERER_IMAGEMAP(map->outputformat) )
     {
         image = msImageCreateIM(map->width, map->height, map->outputformat, 
-				map->web.imagepath, map->web.imageurl, map->resolution);        
+				map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
         if( image != NULL ) msImageInitIM( image );
     }
     else if( MS_RENDERER_RAWDATA(map->outputformat) )
@@ -280,9 +280,7 @@
       else if(GET_LAYER(map, i)->symbolscaledenom > 0 && map->scaledenom > 0)
         GET_LAYER(map, i)->scalefactor = GET_LAYER(map, i)->symbolscaledenom/map->scaledenom;
       else
-        GET_LAYER(map, i)->scalefactor = 1;
-
-      GET_LAYER(map, i)->scalefactor *= map->resolution/map->defresolution;
+        GET_LAYER(map, i)->scalefactor *= map->resolution/map->defresolution;
     }
 
     return image;
@@ -725,7 +723,7 @@
     if(layer->opacity > 0 && layer->opacity < 100) {
       msApplyOutputFormat(&transFormat, image->format, MS_TRUE, MS_NOOVERRIDE, MS_NOOVERRIDE);
       
-      image_draw = msImageCreateGD( image->width, image->height, transFormat, image->imagepath, image->imageurl, map->resolution );
+      image_draw = msImageCreateGD( image->width, image->height, transFormat, image->imagepath, image->imageurl, map->resolution, map->defresolution );
       if(!image_draw) {
         msSetError(MS_GDERR, "Unable to initialize image.", "msDrawLayer()");
         return(MS_FAILURE);
@@ -768,7 +766,7 @@
     if(layer->opacity > 0 && layer->opacity < 100) {
       msApplyOutputFormat(&transFormat, image->format, MS_TRUE, MS_NOOVERRIDE, MS_NOOVERRIDE);
 
-      image_draw = msImageCreateAGG(image->width, image->height, transFormat, image->imagepath, image->imageurl, map->resolution);
+      image_draw = msImageCreateAGG(image->width, image->height, transFormat, image->imagepath, image->imageurl, map->resolution, map->defresolution);
       if(!image_draw) {
         msSetError(MS_GDERR, "Unable to initialize image.", "msDrawLayer()");
         return(MS_FAILURE);
@@ -1007,7 +1005,7 @@
                  */
                 
                 /* adapt width (must take scalefactor into account) */
-                pStyle->width += (pStyle->outlinewidth / layer->scalefactor) * 2;
+                pStyle->width += (pStyle->outlinewidth / (layer->scalefactor/image->resolution_scale_factor)) * 2;
                 pStyle->minwidth += pStyle->outlinewidth * 2;
                 pStyle->maxwidth += pStyle->outlinewidth * 2;
                 pStyle->size += (pStyle->outlinewidth/layer->scalefactor*(map->resolution/map->defresolution));
@@ -1028,7 +1026,7 @@
                  */
                 
                 /* reset widths to original state */
-                pStyle->width -= (pStyle->outlinewidth / layer->scalefactor) * 2;
+                pStyle->width -= (pStyle->outlinewidth / (layer->scalefactor/image->resolution_scale_factor)) * 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 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapgd.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -269,7 +269,7 @@
  * Utility function to create a GD image. Returns
  * a pointer to an imageObj structure.
  */  
-imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution) 
+imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution, double defresolution) 
 {
   imageObj  *image;
 
@@ -298,6 +298,7 @@
     image->imagepath = NULL;
     image->imageurl = NULL;
     image->resolution = resolution;
+    image->resolution_scale_factor = 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 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapimagemap.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -293,7 +293,7 @@
  * a pointer to an imageObj structure.
  */
 imageObj *msImageCreateIM(int width, int height, outputFormatObj *format,
-                          char *imagepath, char *imageurl, double resolution)
+                          char *imagepath, char *imageurl, double resolution, double defresolution)
 {
     imageObj  *image=NULL;
     if (setvbuf(stdout, NULL, _IONBF , 0)){
@@ -331,6 +331,7 @@
             image->imagepath = NULL;
             image->imageurl = NULL;
             image->resolution = resolution;
+            image->resolution_scale_factor = resolution/defresolution;
 
 	    if( strcasecmp("ON",msGetOutputFormatOption( format, "DXF", "OFF" )) == 0){
 		    dxf = 1;

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

Modified: trunk/mapserver/maplegend.c
===================================================================
--- trunk/mapserver/maplegend.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/maplegend.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -203,10 +203,10 @@
   /* create image */
 #ifdef USE_AGG
   if(MS_RENDERER_AGG(map->outputformat))
-     image = msImageCreateAGG(width, height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution);        
+     image = msImageCreateAGG(width, height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
   else
 #endif
-    image = msImageCreateGD(width, height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution);
+    image = msImageCreateGD(width, height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
 
   /* drop this reference to output format */
   msApplyOutputFormat( &format, NULL, MS_NOOVERRIDE, MS_NOOVERRIDE, MS_NOOVERRIDE );
@@ -458,10 +458,10 @@
   /* initialize the legend image */
 #ifdef USE_AGG
   if(MS_RENDERER_AGG(map->outputformat))
-    image = msImageCreateAGG(size_x, size_y, format, map->web.imagepath, map->web.imageurl, map->resolution);        
+    image = msImageCreateAGG(size_x, size_y, format, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
   else
 #endif
-    image = msImageCreateGD(size_x, size_y, format, map->web.imagepath, map->web.imageurl, map->resolution);
+    image = msImageCreateGD(size_x, size_y, format, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
 
   /* drop this reference to output format */
   msApplyOutputFormat(&format, NULL, MS_NOOVERRIDE, MS_NOOVERRIDE, MS_NOOVERRIDE);

Modified: trunk/mapserver/mapogl.cpp
===================================================================
--- trunk/mapserver/mapogl.cpp	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapogl.cpp	2009-10-09 13:07:50 UTC (rev 9432)
@@ -161,7 +161,7 @@
 
 int msSaveImageOgl(imageObj *img, char *filename, outputFormatObj *format)
 {
-	imageObj* gdImg = msImageCreateGD(img->width, img->height, format, filename, NULL, 72);
+        imageObj* gdImg = msImageCreateGD(img->width, img->height, format, filename, NULL, 72, 72);
 
 	OglRenderer* ogl = getOglRenderer(img);
 	ogl->attach(gdImg);

Modified: trunk/mapserver/mappdf.c
===================================================================
--- trunk/mapserver/mappdf.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mappdf.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -226,7 +226,7 @@
         oImage->img.pdf->imagetmp = (imageObj *) 
           msImageCreateGD(map->width, map->height,  
                           msCreateDefaultOutputFormat(map, driver),
-                          map->web.imagepath, map->web.imageurl, map->resolution);
+                          map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
     }
     return oImage;
 }
@@ -1484,7 +1484,7 @@
     {
         image_tmp = msImageCreateGD(map->width, map->height,  
                                     msCreateDefaultOutputFormat(map, driver),
-                                    map->web.imagepath, map->web.imageurl, map->resolution);
+                                    map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
     }
     else
     {

Modified: trunk/mapserver/mapscale.c
===================================================================
--- trunk/mapserver/mapscale.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapscale.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -263,7 +263,7 @@
 
    /* create image */
   image = msImageCreateGD(map->scalebar.width, sy, format,
-                          map->web.imagepath, map->web.imageurl, map->resolution);
+                          map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
 
   /* drop this reference to output format */
   msApplyOutputFormat( &format, NULL, 

Modified: trunk/mapserver/mapserv.c
===================================================================
--- trunk/mapserver/mapserv.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapserv.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -1508,10 +1508,10 @@
       /* initialize the legend image */
 #ifdef USE_AGG
       if(MS_RENDERER_AGG(mapserv->map->outputformat))
-         img = msImageCreateAGG(mapserv->map->legend.keysizex, mapserv->map->legend.keysizey, format, mapserv->map->web.imagepath, mapserv->map->web.imageurl, mapserv->map->resolution);        
+         img = msImageCreateAGG(mapserv->map->legend.keysizex, mapserv->map->legend.keysizey, format, mapserv->map->web.imagepath, mapserv->map->web.imageurl, mapserv->map->resolution, mapserv->map->defresolution);        
       else
 #endif
-        img = msImageCreateGD(mapserv->map->legend.keysizex, mapserv->map->legend.keysizey, format, mapserv->map->web.imagepath, mapserv->map->web.imageurl, mapserv->map->resolution);
+        img = msImageCreateGD(mapserv->map->legend.keysizex, mapserv->map->legend.keysizey, format, mapserv->map->web.imagepath, mapserv->map->web.imageurl, mapserv->map->resolution, mapserv->map->defresolution);
 
   /* allocate the background color */
 #ifdef USE_AGG

Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapserver.h	2009-10-09 13:07:50 UTC (rev 9432)
@@ -1472,6 +1472,8 @@
 #endif
   int width, height;
   double resolution;
+  double resolution_scale_factor;
+
   char *imagepath, *imageurl;
 
   outputFormatObj *format;
@@ -2023,7 +2025,7 @@
 /* ==================================================================== */
 /*      Prototypes for functions in mapimagemap.c                       */
 /* ==================================================================== */
-MS_DLL_EXPORT imageObj *msImageCreateIM(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
+MS_DLL_EXPORT imageObj *msImageCreateIM(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution, double defresolution);
 MS_DLL_EXPORT imageObj *msImageLoadIM( const char *filename );
 MS_DLL_EXPORT imageObj *msImageLoadGD( const char *filename );
 MS_DLL_EXPORT imageObj *msImageLoadGDCtx( gdIOCtx *ctx, const char *driver );
@@ -2050,7 +2052,7 @@
 MS_DLL_EXPORT imageObj *msImageLoadGDCtx(gdIOCtx* ctx, const char *driver);
 MS_DLL_EXPORT int msCompareColors(colorObj *c1, colorObj *c2);
 MS_DLL_EXPORT void msPreAllocateColorsGD(imageObj *image, mapObj *map);
-MS_DLL_EXPORT imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
+MS_DLL_EXPORT imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution, double defresolution);
 MS_DLL_EXPORT imageObj *msImageLoadGD( const char *filename );
 MS_DLL_EXPORT void msImageInitGD( imageObj *image, colorObj *background );
 MS_DLL_EXPORT int msImageSetPenGD(gdImagePtr img, colorObj *color);
@@ -2081,7 +2083,7 @@
 /*      Prototypes for functions in mapagg.cpp                          */
 /* ==================================================================== */
 
-MS_DLL_EXPORT imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
+MS_DLL_EXPORT imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution, double defresolution);
 MS_DLL_EXPORT void msImageInitAGG( imageObj *image, colorObj *background );
 
 MS_DLL_EXPORT int msSaveImageAGG(imageObj *img, char *filename, outputFormatObj *format);

Modified: trunk/mapserver/mapswf.c
===================================================================
--- trunk/mapserver/mapswf.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapswf.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -1146,7 +1146,7 @@
         ((SWFObj *)image->img.swf)->imagetmp = (imageObj *) 
           msImageCreateGD(map->width, map->height,  
                           msCreateDefaultOutputFormat(map, driver),
-                          map->web.imagepath, map->web.imageurl, map->resolution);
+                          map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
     }
     free(driver);
     return image;
@@ -2849,7 +2849,7 @@
     {
         image_tmp = msImageCreateGD(map->width, map->height,  
                                     msCreateDefaultOutputFormat(map, driver),
-                                    map->web.imagepath, map->web.imageurl, map->resolution);
+                                    map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
         bFreeImage = 1;
     }
     else
@@ -3444,7 +3444,7 @@
     {
         imagetmp = msImageCreateGD(map->width, map->height,  
                                    msCreateDefaultOutputFormat(map, driver),
-                                   map->web.imagepath, map->web.imageurl, map->resolution);
+                                   map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);
         bFreeImage = 1;
     }
     else

Modified: trunk/mapserver/maputil.c
===================================================================
--- trunk/mapserver/maputil.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/maputil.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -1384,7 +1384,7 @@
     if( MS_RENDERER_GD(format) )
     {
         image = msImageCreateGD(width, height, format,
-                                imagepath, imageurl, map->resolution);
+                                imagepath, imageurl, map->resolution, map->defresolution);
         if( image != NULL && map) msImageInitGD( image, &map->imagecolor );
     }
     else if(MS_RENDERER_PLUGIN(format)) {
@@ -1410,7 +1410,7 @@
     else if( MS_RENDERER_AGG(format) )
     {
         image = msImageCreateAGG(width, height, format,
-                                 imagepath, imageurl, map->resolution);
+                                 imagepath, imageurl, map->resolution, map->defresolution);
         if( image != NULL && map) msImageInitAGG( image, &map->imagecolor );
     }
 #endif
@@ -1466,7 +1466,7 @@
     else if( MS_RENDERER_IMAGEMAP(format) )
     {
         image = msImageCreateIM(width, height, format,
-                                imagepath, imageurl, map->resolution);
+                                imagepath, imageurl, map->resolution, map->defresolution);
         if( image != NULL ) msImageInitIM( image );
     }
 #ifdef USE_MING_FLASH

Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c	2009-10-09 06:49:57 UTC (rev 9431)
+++ trunk/mapserver/mapwcs.c	2009-10-09 13:07:50 UTC (rev 9432)
@@ -1703,11 +1703,11 @@
     msSetError(MS_WCSERR, "The map outputformat is missing!", "msWCSGetCoverage()");
     return msWCSException(map, NULL, NULL, params->version );
   } else if( MS_RENDERER_GD(map->outputformat) ) {
-    image = msImageCreateGD(map->width, map->height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution);        
+    image = msImageCreateGD(map->width, map->height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
     if( image != NULL ) msImageInitGD( image, &map->imagecolor );
 #ifdef USE_AGG
   } else if( MS_RENDERER_AGG(map->outputformat) ) {
-     image = msImageCreateAGG(map->width, map->height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution);        
+     image = msImageCreateAGG(map->width, map->height, map->outputformat, map->web.imagepath, map->web.imageurl, map->resolution, map->defresolution);        
     if( image != NULL ) msImageInitAGG( image, &map->imagecolor );
 #endif
   } else if( MS_RENDERER_RAWDATA(map->outputformat) ) {



More information about the mapserver-commits mailing list