PIL - setting the width of lines in ImageDraw

John Hunter jdhunter at ace.bsd.uchicago.edu
Tue Sep 14 07:05:29 EDT 2004


>>>>> "Max" == Max M <maxm at mxm.dk> writes:


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

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

In matplotlib, you can draw antialiased lines with any color, style,
and width you want.  And we'll do the calculations for you (TM)

  # plot a green line, 4 points thick
  plot(x, y, 'g', linewidth=4)

http://matplotlib.sf.net
And it comes with a windows installer for "lowly windows
developers"....  Requires numeric or numarray.

JDH





More information about the Python-list mailing list