Visual Basic (Declaration) | |
---|---|
<DescriptionAttribute("Occurs on interactive mode user rectangle operations.")> <CategoryAttribute("Interactive Mode")> Public Event InteractiveUserRectangle() As EventHandler(Of RasterViewerRectangleEventArgs) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
[DescriptionAttribute("Occurs on interactive mode user rectangle operations.")] [CategoryAttribute("Interactive Mode")] public event EventHandler<RasterViewerRectangleEventArgs> InteractiveUserRectangle() |
C++/CLI | |
---|---|
[DescriptionAttribute("Occurs on interactive mode user rectangle operations.")] [CategoryAttribute("Interactive Mode")] public: event EventHandler<RasterViewerRectangleEventArgs>^ InteractiveUserRectangle(); |
This example will use the user-defined rectangle interactive mode to let the user select a rectangle on the image to invert.
Visual Basic | Copy Code |
---|---|
Public Sub InteractiveUserRectangleExample(ByVal viewer As RasterImageViewer) |
C# | Copy Code |
---|---|
public void InteractiveUserRectangleExample(RasterImageViewer viewer) |
Only occur when the RasterImageViewer.InteractiveMode property is set to RasterViewerInteractiveMode.UserMode.
Use the RasterViewerInteractiveMode.UserMode and InteractiveUserRectangle to draw a rectangle on the surface of the viewer. The RasterImageViewer object will handle mouse mouse down and up events, mouse movement, canceling (through the ESC key or when the control loses the focus) and clipping.
The InteractiveUserRectangle event will occur everytime the user moves the mouse or clicks any of the buttons with the corresponding data in the RasterViewerRectangleEventArgs of the event.
You can use the user-defined rectangle interactive mode to perform additional interactive operations on the viewer not handled by any of the pre-defined RasterViewerInteractiveMode.
You can use the ViewerToImageRectangle and ImageToViewerRectangle methods to convert a rectangle between image and viewer coordinates.
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family