mapserver-bot · GitHub

Reporter: havatv
Date: 2011/05/11 - 14:59
Trac URL: http://trac.osgeo.org/mapserver/ticket/3868
In maprendering.c, when rendering polygon fills using symbols, 1 is added to the symbol size in both the x and the y direction for scaled symbols:

652             if(s.scale != 1) {
653                pw = MS_NINT(symbol->sizex * s.scale + s.gap)+1;
654                ph = MS_NINT(symbol->sizey * s.scale + s.gap)+1;
655             } else {
656                pw = symbol->sizex + s.gap;
657                ph = symbol->sizey + s.gap;
658             }

This produced a grid of thin lines of "background" colour in the polygon fill at the symbol boundaries (both for GD and AGG).

I am not that familiar with the code, but since the GD renderer does not do anti-aliasing, eliminating the one unit addition should make it easier to get good polygon fill rendering with GD.

I have tried to remove the one unit addition, and if I am careful with the SIZE, the result looks better (both for GD and AGG). It does not seem to produce worse looking results for non-optimal SIZEs.
But it might of course have other unwanted side effect.

Read the original on github.com ↗