[mapserver-commits] r8844 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Mar 28 12:52:03 EDT 2009
Author: aboudreault
Date: 2009-03-28 12:52:03 -0400 (Sat, 28 Mar 2009)
New Revision: 8844
Modified:
trunk/mapserver/mapagg.cpp
trunk/mapserver/mapgd.c
trunk/mapserver/mapimagemap.c
trunk/mapserver/mapserver.h
Log:
To be consistent, changed imageObj::resolution type from unsigned int to double
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2009-03-28 16:22:23 UTC (rev 8843)
+++ trunk/mapserver/mapagg.cpp 2009-03-28 16:52:03 UTC (rev 8844)
@@ -857,7 +857,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, unsigned int resolution)
+imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution)
{
imageObj *pNewImage = NULL;
@@ -904,7 +904,7 @@
}
#ifdef USE_GD_RESOLUTION
/* Set the resolution */
- gdImageSetResolution(image->img.gd, image->resolution, image->resolution);
+ gdImageSetResolution(image->img.gd, (unsigned int)image->resolution, (unsigned int)image->resolution);
#endif
image->buffer_format=MS_RENDER_WITH_AGG;
/*
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2009-03-28 16:22:23 UTC (rev 8843)
+++ trunk/mapserver/mapgd.c 2009-03-28 16:52:03 UTC (rev 8844)
@@ -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, unsigned int resolution)
+imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution)
{
imageObj *image;
@@ -321,7 +321,7 @@
{
#ifdef USE_GD_RESOLUTION
/* Set the resolution */
- gdImageSetResolution(image->img.gd, image->resolution, image->resolution);
+ gdImageSetResolution(image->img.gd, (unsigned int)image->resolution, (unsigned int)image->resolution);
#endif
if(image->format->imagemode == MS_IMAGEMODE_PC256) {
Modified: trunk/mapserver/mapimagemap.c
===================================================================
--- trunk/mapserver/mapimagemap.c 2009-03-28 16:22:23 UTC (rev 8843)
+++ trunk/mapserver/mapimagemap.c 2009-03-28 16:52:03 UTC (rev 8844)
@@ -293,7 +293,7 @@
* a pointer to an imageObj structure.
*/
imageObj *msImageCreateIM(int width, int height, outputFormatObj *format,
- char *imagepath, char *imageurl, unsigned int resolution)
+ char *imagepath, char *imageurl, double resolution)
{
imageObj *image=NULL;
if (setvbuf(stdout, NULL, _IONBF , 0)){
Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h 2009-03-28 16:22:23 UTC (rev 8843)
+++ trunk/mapserver/mapserver.h 2009-03-28 16:52:03 UTC (rev 8844)
@@ -1373,7 +1373,7 @@
%immutable;
#endif
int width, height;
- unsigned int resolution;
+ double resolution;
char *imagepath, *imageurl;
outputFormatObj *format;
@@ -1905,7 +1905,7 @@
/* ==================================================================== */
/* Prototypes for functions in mapimagemap.c */
/* ==================================================================== */
-MS_DLL_EXPORT imageObj *msImageCreateIM(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, unsigned int resolution);
+MS_DLL_EXPORT imageObj *msImageCreateIM(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
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 );
@@ -1932,7 +1932,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, unsigned int resolution);
+MS_DLL_EXPORT imageObj *msImageCreateGD(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
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);
@@ -1963,7 +1963,7 @@
/* Prototypes for functions in mapagg.cpp */
/* ==================================================================== */
-MS_DLL_EXPORT imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, unsigned int resolution);
+MS_DLL_EXPORT imageObj *msImageCreateAGG(int width, int height, outputFormatObj *format, char *imagepath, char *imageurl, double resolution);
MS_DLL_EXPORT void msImageInitAGG( imageObj *image, colorObj *background );
MS_DLL_EXPORT int msSaveImageAGG(imageObj *img, char *filename, outputFormatObj *format);
More information about the mapserver-commits
mailing list