
'Declaration Public Class CropSelectionTool Inherits RectangularSelectionTool Implements Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject, Vintasoft.Imaging.UIActions.ISupportUIActions
public class CropSelectionTool : RectangularSelectionTool, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IInteractiveObject, Vintasoft.Imaging.UI.VisualTools.UserInteraction.IRectangularInteractiveObject, Vintasoft.Imaging.UIActions.ISupportUIActions
Class CropSelectionToolExample ''' <summary> ''' Programmatically crops an image in image viewer. ''' </summary> ''' <param name="viewer">Image viewer.</param> Public Sub ProgrammaticallyCropImageInViewer(viewer As Vintasoft.Imaging.UI.ImageViewer) ' create an instance of CropSelectionTool class Dim cropSelectionTool As New Vintasoft.Imaging.UI.VisualTools.CropSelectionTool() ' set the tool as the current tool of the ImageViewer viewer.VisualTool = cropSelectionTool ' set the region of interest on image cropSelectionTool.Rectangle = New System.Drawing.Rectangle(50, 50, 250, 150) ' crop an image cropSelectionTool.Crop() End Sub End Class
class CropSelectionToolExample { /// <summary> /// Programmatically crops an image in image viewer. /// </summary> /// <param name="viewer">Image viewer.</param> public void ProgrammaticallyCropImageInViewer(Vintasoft.Imaging.UI.ImageViewer viewer) { // create an instance of CropSelectionTool class Vintasoft.Imaging.UI.VisualTools.CropSelectionTool cropSelectionTool = new Vintasoft.Imaging.UI.VisualTools.CropSelectionTool(); // set the tool as the current tool of the ImageViewer viewer.VisualTool = cropSelectionTool; // set the region of interest on image cropSelectionTool.Rectangle = new System.Drawing.Rectangle(50, 50, 250, 150); // crop an image cropSelectionTool.Crop(); } }
System.Object
Vintasoft.Imaging.UI.VisualTools.VisualTool
Vintasoft.Imaging.UI.VisualTools.UserInteraction.UserInteractionVisualTool
Vintasoft.Imaging.UI.VisualTools.RectangularSelectionTool
Vintasoft.Imaging.UI.VisualTools.CropSelectionTool
Vintasoft.Imaging.Pdf.UI.PdfCropSelectionTool
Target Platforms: .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5