Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
resolutionfactor not used during LegendIcon creation (AGG) #4725
I'm using the createLegendIcon class method, in a PHPMapscript script to generate a high resolution legend (PNG icons with AGG/PNG driver), inserted in a PDF document. The RESOLUTION value in the mapfile is modified from the script to obtain a medium (150 DPI) or high (300 DPI) resolution map. The DEFRESOLUTION is always 75. The map is scaled correctly but the legend icons are always in a poor resolution (normal size) or not well scaled (if oversized). It seems they are generated in a screen resolution.
Searching in maplegend.c I modified the calls to msDrawLineSymbol and msDrawShadeSymbol in msDrawLegendIcon function : I changed the last parameter from lp->scalefactor to lp-scalefactor * (image_draw->resolutionfactor) and the results are now ok.