[reportlab-users] Color of grid lines

Andy Robinson reportlab-users@reportlab.com
Mon, 29 Mar 2004 11:34:22 +0100


> then the grid of the categoryAxis appears to be grey when
> rendered with renderPM (format='PNG')

renderPM does antialiasing.  If your logical line does
not perfectly align with underlying pixels, it tends to
do two adjacent grey lines.

Imaging a line from (0,50) to (100,50) in logical space
in a 200x200 drawing.  It will try to half-shade row 49
and row 50 of the bitmap, since your line is running
directly between two rows of pixels.

If you draw from (0, 50.5) to (100,50.5) it will probably
draw a one-pixel black line.

So, if you did nothing special with translations or scaling,
you could put everything inside a group object which applies
a half pixel shift.

- Andy



> 
> When I render it as PDF, then everything is fine.
> 
> How can I get the grid in pure black?
> 
> With kind regards
> Florian Reiser
> 
> 
> _______________________________________________
> reportlab-users mailing list
> reportlab-users@reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>