#####----- Show zoomed picture -----##### # $zoom is number between -4 and 3; Negative for zoom-out and positive 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'); ###-- Omited: Create objs in $CW w/ orig dims --### ###-- Scale objects --### $zfactor is one of (0.25, 0.3, 0.5, 1, 2, 3) my $zfactor = ($zoom > 0) ? $zoom : -1 / $zoom; $CW->scale('all', 0, 0, $zfactor, $zfactor);