Oh, the image only zooms because I deal with it separately by redrawing the image at the appropriate scale every time the canvas is zoomed.
#####----- Show zoomed picture -----##### # $zoom is number between -4 and 3; Negative for zoom-out and positiv +e for zoom-in as worked out in the conditional statement. # $img is the original image. # $zimg is the zoomed image. $zimg = $MW->Photo(); ($zoom > 0) ? $zimg->copy($img, -zoom => $zoom) : $zimg->copy($img, -subsample => ($zoom * -1)); $CW->createImage(0,0, -anchor => 'nw', -image => $zimg, -tags => 'dwg' +);
It's just the object scaling (that I try to do with $CW->scale()) that doesn't work and that gives me the aforementioned error.
I'll try out your code (assuming it's tested) to ensure there is nothing wrong with my Tk. If there isn't I'm going to take the non-essential stuff out of my code and if it still doesn't work, I'll post it here!
Thanks,
PerldoughIn reply to Re^2: Tk: Scaling canvas objects
by Anonymous Monk
in thread Tk: Scaling canvas objects
by perldough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |