Smooth scrolling zoom in draw widget; how? [message #7837] |
Thu, 09 January 1997 00:00  |
kak
Messages: 16 Registered: February 1995
|
Junior Member |
|
|
I use a scrollable draw widget to display large images (up to 2048x2048)
at full resolution (viewport is 512x512 or 1024x1024 depending
on screen resolution).
The problem is: users want to zoom into images and keep the smooth
scrolling viewport for the expanded image . If I simply blow up my image
by the required factor, the size will quickly increase beyond
the computers memory.
I thought about keeping the original byte scaled image as byte array
or as pixmap. For each viewport scroll event I would calculate the
portion of the zoomed image to display from the current viewport
coordinates. Then I would take the respective subarray of the image
and extend it using rebin(subarr, view_port_x, view_port_y, /sample)
and finally display it in the viewport.
I doubt that this is efficient enough to provide the illusion of smooth
scrolling.
Has anybody a better idea?
Karl
--
--
IPP, PO Box 1533 | Phone: +49-89-3299-1655 | E-Mail:
D-85740 Garching | FAX : +49-89-3299-1149 | krieger@ipp.mpg.de
|
|
|