ImageViewerSpyGlassInteractiveMode Class (original) (raw)

Summary

Draws and pans a spy glass on the viewer.

Syntax

@interface LTImageViewerSpyGlassInteractiveMode : LTImageViewerInteractiveMode 

Example

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 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();