ImageViewerInteractiveMode works with the InteractiveService object of the ImageViewer to provide rich user interface experience when the user interacts with the viewer using mouse or touch.
ImageViewerInteractiveMode is a base abstract class, you can derive your own class to handle custom interaction with the viewer. Out of the box, LEADTOOLS provide the following implementations:
Class | Description |
---|---|
ImageViewerPanZoomInteractiveMode |
Supports panning and zooming with the mouse and multi-touch. |
ImageViewerZoomToInteractiveMode |
Zooms to image rectangle created by the user using mouse or touch. |
ImageViewerMagnifyGlassInteractiveMode |
Magnifies the portion of the image under the mouse or touch. |
ImageViewerCenterAtInteractiveMode |
Centers the image inside the user based on user mouse click or touch tap. |
ImageViewerRubberBandInteractiveMode |
Draws a temporary rectangle on top of the image using the mouse or touch. Can be used to perform any extra functionality such as drawing a region of interest for a user-defined operation. |
To use an interactive mode, you create an instance of any of the derived classes and assign it to the viewer using one of the following methods:
ImageViewer.DefaultInteractiveMode: Assigns the interactive mode to be set as the default one.
ImageViewer.TouchInteractiveMode: Assigns the interactive mode in devices that support touch.
ImageViewer.MouseWheelInteractiveMode: Assigns the interactive mode to the mouse wheel.