[Tutor] To Arc (PIL) or Not to Arc (Tkinter)

Alan Gauld alan.gauld at btinternet.com
Mon Jan 26 00:33:36 CET 2009


"Wayne Watson" <sierra_mtnview at sbcglobal.net> wrote

> When I noticed that both have an arc method that gave me pause.

> Apparently, PIL provides IP (image processing:  ...while Tkinter
> provides widgets. In PIL, arc allows one to draw on images but
> doesn't allow one to display them. The display and presentation
> is the function of Tkinter, and can draw on the widget canvas
> where an image, from PIL, might be placed. Comments?

Yes you have understood pretty well. PIL provides more sophisticated
IP than Tkinter can do on its own. For simple images such as
charts/graphs you might decide to draw them direct in Tkinter
without using PIL. For that reason Tkinter canvas allows you to
draw shapes, such as arc, directly on the canvas.

For more sophisticated use (such as complex charts) you might
use a plotting library to create the image and then display the image
in Tkinter. Or to manipulate sophisticated graphics (like photos)
you would probably use PIL or ImageMagik or somesuch.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list