[Tutor] Tkinter and Antialiasing

Alan Gauld alan.gauld at btinternet.com
Mon Apr 13 01:41:16 CEST 2009

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

> If I draw a fairly slanted line across an image using Tkinter, it looks a 
> bit jagged. Is this typical of Tkinter graphics, or is there an option or 
> mechanism that will antialias?

I think that is a feature of the canvas and its underlying code.
I can't see any anti-aliasing features although you can of course
render it as a smooth line, and mess around with the splines settings,
but I don't think that will help in this case if it's a single straight 

This might be an area where OpenGL or another toolkit might help.
If its part of a graphic then generating the graphic as an image and
loading the image into the canvas might work better.


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list