PIL - setting the width of lines in ImageDraw

Max M maxm at mxm.dk
Tue Sep 14 07:36:02 CEST 2004

Erik Heneryd wrote:
> Larry Bates wrote:
>> There's nothing wrong with "slanted" rectangles.
>> In PIL you just define upper left and lower right
>> coordinates of the rectangle in pixels.  That's
>> what a thick line would do anyway.
> Really?  Didn't know that.  Please show me how.

The problem is that you have to calculate the rectangles corner 
positions yourself. Which make it a bit less trivial than drawing lines.

If you want a fat line from ((0,0),(10,10)) you would need to calculate 
where the corners should be yourself.

regards Max M

More information about the Python-list mailing list