Tkinter canvas scaling does not work for Images??

Fredrik Lundh fredrik at pythonware.com
Tue Apr 20 11:06:59 EDT 1999


John van der Koijk wrote:
> I'm playing around with Pmw and (thus Tkinter). After some
> experiments, I found out that I can scale lines and such, but Images
> do not seem to respond to similar requests. The docs don't seem to
> mention this interesting limitation.

answer 1: the "scale" method modifies the item coordinates
only.  since bitmaps, images, windows, and text strings have
a single coordinate pair, they can only move around, not
change size...

answer 2: resizing images and fonts on the fly is a non-trivial
problem, especially if you want both performance and port-
ability.  so Tk simply passes on this one...

in other words, you're on your own.  it can be done,
but it takes some work...

</F>





More information about the Python-list mailing list