PIL ImageDraw line not long enough

Bob Greschke bob at greschke.com
Sat Apr 1 13:57:16 EST 2006


"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:mailman.3914.1143785974.27775.python-list at python.org...
> Bob Greschke wrote:
>
>> I have to extend the vertical line to y+8, instead of y+7 to get the line
>> segment to be drawn long enough.  This is on Linux, Solaris, 2.x versions
>> of
>> Python, 1.1.5 version of PIL, and on Windows with the latest of
>> everything.
>> Am I missing a setting somewhere?
>
> I recently got another bug reported that talked about the same thing, so
> it's probably a bug in 1.1.5 that nobody has noticed before.
>
> (as nikie mentions, the low-level line segment drawer avoids drawing over-
> lapping points, but the "line" wrapper should add the last pixel)
>
> </F>

Hey! It's not ME for once. :)  It seems to only happen with lines that have
a vertical-ness to them (straight up-down or diagonal).  It doesn't seem to
happen when the line segment is just horizontal.

These are the characters that I am drawing

www.greschke.com/unlinked/images/graphs.png

It works really well.

Thanks!

Bob






More information about the Python-list mailing list