[mapserver-commits] r7945 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Oct 3 11:42:20 EDT 2008


Author: tbonfort
Date: 2008-10-03 11:42:20 -0400 (Fri, 03 Oct 2008)
New Revision: 7945

Modified:
   trunk/mapserver/mapagg.cpp
Log:
fix agg legend keyimage (#2715)


Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp	2008-10-03 15:21:25 UTC (rev 7944)
+++ trunk/mapserver/mapagg.cpp	2008-10-03 15:42:20 UTC (rev 7945)
@@ -2311,7 +2311,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