Image Mouse Zoom and Pan
This function adds instant mouse zoom (mouse wheel) and pan (mouse drag) capabilities to figures,
designed for displaying 2D images in applications (e.g. created with GUIDE) that require lots of drag & zoom. It also lets you add custom callback functions to mouse button events so you can keep adding functionality.
Features:
* Minimalistic, tries not to get in your way.
* Designed to mimic behavior from common image viewers.
* Prevents the user from zooming out when the image is smaller than the Figure.
* User cannot zoom or drag the image outside of the Figure.
* Improved panning method to deal with MATLAB's lack of anti-aliasing (no deformation on high zoom level).
* Lets you add callback functions for the mouse ButtonDown / ButtonUp events so you don't lose control.
* Lots of configuration options.
Please check https://github.com/danyalejandro/imgzoompan (or the README.md text file included) for full usage instructions and examples. Github issue notifications and pull requests are welcome.
Cite As
Dany Cabrera (2024). Image Mouse Zoom and Pan (https://github.com/danyalejandro/imgzoompan), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
examples
Versions that use the GitHub default branch cannot be downloaded
Version | Published | Release Notes | |
---|---|---|---|
1.2.0.0 | Fixed bug that didn't let PanMouseButton and ResetMouseButton work with the left click (1). |
|
|
1.1.0.0 | Improved panning method to deal with MATLAB's lack of anti-aliasing
|
|
|
1.0.0.0 |
|