Draws and pans a spy glass on the viewer.
public class ImageViewerSpyGlassInteractiveMode : ImageViewerInteractiveMode
Public Class ImageViewerSpyGlassInteractiveMode
Inherits ImageViewerInteractiveMode
public ref class ImageViewerSpyGlassInteractiveMode : ImageViewerInteractiveMode
ImageViewerSpyGlassInteractiveMode derives from ImageViewerInteractiveMode and subscribes to the following events of the InteractiveService:
ImageViewerSpyGlassInteractiveMode interactive mode does not perform any action on the viewer (besides drawing the the spy glass). It is up to the user to implement any custom operation required. For example, to implement a magnify glass. ImageViewerMagnifyGlassInteractiveMode derives from ImageViewerSpyGlassInteractiveMode and overrides the OnDrawImage method to draw a magnified version of the area under the spy glass.
ImageViewerSpyGlassInteractiveMode also supports redirecting the output to an external control instead of the viewer surface, for an example, refer to RedirectControl.
For more information, refer to Image Viewer Interactive Modes.
This example will use ImageViewerSpyGlassInteractiveMode to show an inverted portion of the image under the mouse.
Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
_imageViewer.InteractiveModes.BeginUpdate();
var spyGlass = new ImageViewerSpyGlassInteractiveMode();
spyGlass.BackgroundBrush = new SolidBrush(Color.FromArgb(128, Color.Yellow));
spyGlass.BackgroundBrush = Brushes.Yellow;
spyGlass.AutoItemMode = ImageViewerAutoItemMode.AutoSet;
spyGlass.EnsureVisible = false;
_imageViewer.InteractiveModes.Add(spyGlass);
_imageViewer.InteractiveModes.EndUpdate();
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
_imageViewer.InteractiveModes.BeginUpdate()
Dim spyGlass As New ImageViewerSpyGlassInteractiveMode()
spyGlass.BackgroundBrush = New SolidBrush(Color.FromArgb(128, Color.Yellow))
spyGlass.BackgroundBrush = Brushes.Yellow
spyGlass.AutoItemMode = ImageViewerAutoItemMode.AutoSet
spyGlass.EnsureVisible = False
_imageViewer.InteractiveModes.Add(spyGlass)
_imageViewer.InteractiveModes.EndUpdate()
Products |
Support |
Feedback: ImageViewerSpyGlassInteractiveMode Class - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.