VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging.UI.VisualTools Namespace / ZoomSelectionTool Class
Members Example



In This Topic
    ZoomSelectionTool Class
    In This Topic
    Visual tool for zooming image region in image viewer.
    Object Model
    ZoomSelectionTool ClassIInteractionController InterfaceImageViewer ClassIInteractionController InterfaceRectangularObjectTransformer Class
    Syntax
    Remarks
    Rectangular region of image in image viewer can be zoomed as follows:
    • place the mouse to the desired position
    • press the action button (VisualTool.ActionButton) and select the "zoom" region by holding the action button
    • release the action button
    • press the action button (VisualTool.ActionButton) inside the "zoom" region for zooming of image; press any mouse button outside of the "zoom" region for canceling zooming 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 programmatically zoom an image in image viewer.
    Class ZoomSelectionToolExample
        ' Programmatically zoom an image in image viewer.
        Public Sub ProgrammaticallyZoomImageInViewer(viewer As Vintasoft.Imaging.UI.ImageViewer)
            ' create an instance of ZoomSelectionTool class
            Dim zoomSelectionTool As New Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool()
            ' set the tool as the current tool of the ImageViewer
            viewer.VisualTool = zoomSelectionTool
            ' set the region of interest on image
            zoomSelectionTool.Rectangle = New System.Drawing.Rectangle(50, 50, 250, 150)
            ' zoom the selected region of image
            zoomSelectionTool.Zoom()
        End Sub
    End Class
    class ZoomSelectionToolExample
    {
        // Programmatically zoom an image in image viewer.
        public void ProgrammaticallyZoomImageInViewer(
            Vintasoft.Imaging.UI.ImageViewer viewer)
        {
            // create an instance of ZoomSelectionTool class
            Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool zoomSelectionTool = 
                new Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool();
            // set the tool as the current tool of the ImageViewer
            viewer.VisualTool = zoomSelectionTool;
            // set the region of interest on image
            zoomSelectionTool.Rectangle = new System.Drawing.Rectangle(50, 50, 250, 150);
            // zoom the selected region of image
            zoomSelectionTool.Zoom();
        }
    }
    Inheritance Hierarchy
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also