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



In This Topic
    RectangularSelectionTool Class
    In This Topic
    Visual tool for selecting a rectangular image region in image viewer.
    Object Model
    RectangularSelectionTool ClassIInteractionController InterfaceImageViewer ClassIInteractionController InterfaceRectangularObjectTransformer Class
    Syntax
    Remarks
    Rectangular region of image in image viewer can be selected as follows:
    • place the mouse to the desired position
    • press the action button (VisualTool.ActionButton) and select the region by holding the action button
    • release the action button to stop the selection of region

    Rectangular region of image in image viewer can be programmatically selected with Rectangle property.

    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 RectangularSelectionTool as active visual tool in Vintasoft.Imaging.UI.ImageViewer.
    Class RectangularSelectionToolExample
    	Public Sub SetRectangularSelectionToolAsActiveVisualToolOfImageViewer(viewer As Vintasoft.Imaging.UI.ImageViewer)
    		' create an instance of the RectangularSelectionTool class
    		Dim rectangularSelectionTool1 As New Vintasoft.Imaging.UI.VisualTools.RectangularSelectionTool()
    		' set the tool as the current tool of the ImageViewer
    		viewer.VisualTool = rectangularSelectionTool1
    	End Sub
    End Class
    class RectangularSelectionToolExample
    {
        public void SetRectangularSelectionToolAsActiveVisualToolOfImageViewer(
            Vintasoft.Imaging.UI.ImageViewer viewer)
        {
            // create an instance of the RectangularSelectionTool class
            Vintasoft.Imaging.UI.VisualTools.RectangularSelectionTool rectangularSelectionTool1 = 
                new Vintasoft.Imaging.UI.VisualTools.RectangularSelectionTool();
            // set the tool as the current tool of the ImageViewer
            viewer.VisualTool = rectangularSelectionTool1;
        }
    }
    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