Shows a magnified version of the image on top of the viewer.
public class ImageViewerMagnifyGlassInteractiveMode : ImageViewerSpyGlassInteractiveMode
@interface LTImageViewerMagnifyGlassInteractiveMode : LTImageViewerSpyGlassInteractiveMode<NSCoding>
public ref class ImageViewerMagnifyGlassInteractiveMode : ImageViewerSpyGlassInteractiveMode
ImageViewerMagnifyGlassInteractiveMode derives from ImageViewerSpyGlassInteractiveMode and waits for the DrawImage event. When this event fires, it will then use the ScaleFactor value to draw a magnified version of the image area underneath the spy glass on top of the viewer.
Drawing a rubber-band on the viewer is usually followed by another user operation to perform the action. In most cases, the rubber band is to be restricted on the "work" area. The RestrictToWorkBounds can control this behavior.
This interactive mode does not subscribe to any additional events from the InteractiveService beyond those in ImageViewerSpyGlassInteractiveMode and does not set InteractiveEventArgs.IsHandled to true in any additional way.
For more information, refer to Image Viewer Interactive Modes.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
public ImageViewer _imageViewer;
public void ImageViewerExample()
{
// Create the image viewer
_imageViewer = new ImageViewer();
_imageViewer.Dock = DockStyle.Fill;
_imageViewer.BackColor = SystemColors.AppWorkspace;
this.Controls.Add(_imageViewer);
_imageViewer.BringToFront();
// Add Pan/Zoom interactive mode
// Click and drag to pan, CTRL-Click and drag to zoom in and out
_imageViewer.DefaultInteractiveMode = new ImageViewerPanZoomInteractiveMode();
// Get each ImageViewerInteractiveMode. This should only return PanZoom
foreach (var mode in _imageViewer.InteractiveModes)
{
Debug.WriteLine(mode);
}
var intertiaOptions = ControlInertiaScrollOptions.CreateDefault();
intertiaOptions.IsEnabled = true;
// Load an image
using (var codecs = new RasterCodecs())
_imageViewer.Image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "image1.cmp"));
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document