VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.UI.VisualTools Namespace / MagnifierTool Class
Members Example



In This Topic
    MagnifierTool Class
    In This Topic
    Visual tool for magnification of image region in image viewer.
    Object Model
    MagnifierTool ClassImageViewer ClassProcessingCommandBase Class
    Syntax
    'Declaration
     
    Public Class MagnifierTool 
       Inherits VisualTool
    public class MagnifierTool : VisualTool 
    public __gc class MagnifierTool : public VisualTool 
    public ref class MagnifierTool : public 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 (VisualTool.ActionButton) to magnify the region of image

    If VisualTool.ActionButton is set to right mouse button, context menu during action can be disabled with the VisualTool.DisableContextMenu property.
    Example
    This example shows how to set the MagnifierTool as active visual in Vintasoft.Imaging.UI.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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also