VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.UI.VisualTools Namespace / MagnifierTool Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
MagnifierTool Class
In This Topic
Represents a visual tool for magnification of image region in image viewer.
Object Model
ProcessingCommandBase ImageViewer MagnifierTool
Syntax
'Declaration

Public Class MagnifierTool
   Inherits VisualTool

public class MagnifierTool : VisualTool

Remarks

Region of image in image viewer can be magnified as follows:

  • place the mouse to the desired position
  • press and hold the action button (ActionButton) to magnify the region of image

If ActionButton is set to right mouse button, context menu during action can be disabled with the DisableContextMenu property.

Example

This C#/VB.NET code shows how to set the MagnifierTool as active visual in ImageViewer.


Class MagnifierToolExample
    Public Sub SetMagnifierToolAsActiveVisualToolOfImageViewer(viewer As Vintasoft.Imaging.UI.ImageViewer)
        ' create an instance of the PanTool class
        Dim magnifierTool1 As New Vintasoft.Imaging.UI.VisualTools.MagnifierTool()
        ' set the size, in pixels, of magnifier window
        magnifierTool1.Size = New System.Drawing.Size(200, 200)
        ' set the zoom factor of magnifier
        magnifierTool1.Zoom = 400
        ' set the tool as the current tool of the ImageViewer
        viewer.VisualTool = magnifierTool1
    End Sub
End Class


class MagnifierToolExample
{
    public void SetMagnifierToolAsActiveVisualToolOfImageViewer(
        Vintasoft.Imaging.UI.ImageViewer viewer)
    {
        // create an instance of the PanTool class
        Vintasoft.Imaging.UI.VisualTools.MagnifierTool magnifierTool1 = 
            new Vintasoft.Imaging.UI.VisualTools.MagnifierTool();
        // set the size, in pixels, of magnifier window
        magnifierTool1.Size = new System.Drawing.Size(200, 200);
        // set the zoom factor of magnifier
        magnifierTool1.Zoom = 400;
        // set the tool as the current tool of the ImageViewer
        viewer.VisualTool = magnifierTool1;
    }
}

Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.UI.VisualTools.VisualTool
      Vintasoft.Imaging.UI.VisualTools.MagnifierTool

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also