Error processing SSI file
(Leadtools.Controls)

Show in webframe

ImageViewerSpyGlassInteractiveMode Class




Members 
Draws and pans a spy glass on the viewer.
Object Model
Syntax
public class ImageViewerSpyGlassInteractiveMode : ImageViewerInteractiveMode 
'Declaration
 
Public Class ImageViewerSpyGlassInteractiveMode 
   Inherits ImageViewerInteractiveMode
Remarks

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.

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:

Copy Code  
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()
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();
Requirements

Target Platforms

See Also

Reference

ImageViewerSpyGlassInteractiveMode Members
Leadtools.Controls Namespace

Error processing SSI file