[reportlab-users] Line width

Robin Becker robin at reportlab.com
Fri Mar 11 05:30:57 EST 2005


Christian Junker wrote:
> Hi all,
> 
> I do have a question about the canvas method setLineWidth(n):
> If I call this function with the argument having a value of 0, it does
> not really produce a width of 0 (* <whatever unit>) because if I draw
> lines then they are still visible on the page.
> How am I able to draw a line that has no actual width?
> Or in other words:
> How can I draw an invisible line?
> 
> I am thankful for any kind of help.
> 
This is a property of Adobe's renderer. Zero width lines aren't actually zero 
they're the smallest possible width. I don't understand it either. If you know 
the background you could change the line colour, but easiest is to not draw the 
line at all. As a hack you could wrap the various line drawing functions with 
methods that test for zero line width.
-- 
Robin Becker


More information about the reportlab-users mailing list