[mapserver-commits] r12408 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:23:13 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:23:13 -0700 (Fri, 26 Aug 2011)
New Revision: 12408

Modified:
   trunk/mapserver/mapcache/src/tileset.c
Log:
add missing lib
thomas.bonfort | 2011-07-22 15:32:15 +0200 (Fri, 22 Jul 2011)

Modified: trunk/mapserver/mapcache/src/tileset.c
===================================================================
--- trunk/mapserver/mapcache/src/tileset.c	2011-08-26 11:23:09 UTC (rev 12407)
+++ trunk/mapserver/mapcache/src/tileset.c	2011-08-26 11:23:13 UTC (rev 12408)
@@ -108,14 +108,12 @@
       cairo_surface_t* srcsurface= cairo_image_surface_create_for_data(im->data, CAIRO_FORMAT_ARGB32,
             im->w, im->h,im->stride);
       /*compute the pixel position of top left corner*/
-      double dstminx = floor((tilebbox[0]-bbox[0])/hresolution);
-      double dstminy = floor((bbox[3]-tilebbox[3])/vresolution);
+      double dstminx = ((tilebbox[0]-bbox[0])/hresolution);
+      double dstminy = ((bbox[3]-tilebbox[3])/vresolution);
       double hf = tileresolution/hresolution;
       double vf = tileresolution/vresolution;
-      double dstwidth = ceil(im->w*hf);
-      double dstheight = ceil(im->h*vf);
-      hf = dstwidth/(double)im->w;
-      vf = dstheight/(double)im->h;
+      double dstwidth = (im->w*hf);
+      double dstheight = (im->h*vf);
       cairo_save(cr);
       //cairo_clip(cr);
       cairo_translate (cr, dstminx,dstminy);



More information about the mapserver-commits mailing list