[Tkinter-discuss] Canvas create_line dropping pixels

Bob Greschke bob at passcal.nmt.edu
Wed May 6 17:57:03 CEST 2009


I'm trying to draw letters and numbers (need rotated text without  
using PMW and all the other solutions I've seen), but create_line  
drops pixels at the ends of the lines it draws.  Sometimes the  
beginning pixel is missing and sometimes the end pixel.  Is there a  
work around other than the obvious of extending the the line an extra  
pixel where necessary?  It does this on old Suns, new Macs and Windows  
(except different pixels are missing between the different OSs).  PIL  
had this problem a while back, but it was fixed with v1.1.6.

Like this should be a small "+" sign, but it is missing the end pixels  
on both lines (and just making the "+" bigger doesn't seem to help.

Can.create_line((Xx-1, Yy-1, Xx+1, Yy-1), fill = "white")
Can.create_line((Xx, Yy-2, Xx, Yy), fill = "white")

I've fiddled with the capstyle/joinstyle/arrow options, but haven't  
come up with anything.

Thanks!

Bob



More information about the Tkinter-discuss mailing list