It is common to have a view of something that can be both scrolled and zoomed. The widget pictured above allows both actions. For example, you may in one gesture zoom out, find another area of interest, and zoom in on it. The best way to get a feel for how it works is to try it -- here is the source code:
- zoom_scroll.py (requires Python, PyGtk, Gtk-2)
The widget is a clipped view onto a triangle. The triangle may be dragged around. The triangle's horizontal position controls scrolling, and the width of the visible section controls the zoom level.
It would be neat to have this in a browser, you could leapfrog between parts of a web-page easily (the browser would have to support proper scaling, non-trivial in anything but OS-X...).
Things left to do:
- A sweet spot at 100% zoom level.
- The mouse cursor hitting the edge of the screen should not prevent dragging. For example, in a browser the scroll bar is at the far right of the screen, and you want to sweep the triangle around in an arc beyond the screen border.