[mapserver-commits] r7947 - branches/branch-5-2/mapserver

svn at osgeo.org svn at osgeo.org
Fri Oct 3 16:28:48 EDT 2008


Author: tbonfort
Date: 2008-10-03 16:28:47 -0400 (Fri, 03 Oct 2008)
New Revision: 7947

Modified:
   branches/branch-5-2/mapserver/HISTORY.TXT
   branches/branch-5-2/mapserver/mapagg.cpp
Log:
legend keyimage resampling with agg (#2715)


Modified: branches/branch-5-2/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-2/mapserver/HISTORY.TXT	2008-10-03 16:26:00 UTC (rev 7946)
+++ branches/branch-5-2/mapserver/HISTORY.TXT	2008-10-03 20:28:47 UTC (rev 7947)
@@ -13,6 +13,8 @@
 Current Version (SVN branch-5-2)
 --------------------------------
 
+- legend keyimage resampling with agg (#2715)
+
 - tileindexed rasters when DATA is manipulated via mapscript work (#2783)
 
 - PHP: add priority attribute to the label object (#2782)

Modified: branches/branch-5-2/mapserver/mapagg.cpp
===================================================================
--- branches/branch-5-2/mapserver/mapagg.cpp	2008-10-03 16:26:00 UTC (rev 7946)
+++ branches/branch-5-2/mapserver/mapagg.cpp	2008-10-03 20:28:47 UTC (rev 7947)
@@ -2324,7 +2324,8 @@
     agg::rendering_buffer thepixmap = gdImg2AGGRB_BGRA(keyimage->img.gd);
     GDpixfmt img_pixf(thepixmap);
     img_pixf.premultiply();
-    ren->renderPixmapBGRA(img_pixf,dstX,dstY,0,1);
+    double scalefactor = (double)width / (double)keyimage->width; 
+    ren->renderPixmapBGRA(img_pixf,dstX+width/2,dstY+height/2,0,scalefactor); 
     delete[](thepixmap.buf());
     /* TO DO: we may want to handle this differently depending on the relative size of the keyimage */
   } else {



More information about the mapserver-commits mailing list