The status of the interactive mode.
public enum RasterViewerInteractiveStatus
public enum class RasterViewerInteractiveStatus : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable
public:
enum class RasterViewerInteractiveStatus sealed
Value | Member | Description |
---|---|---|
0 | Begin | The interactive mode has started. |
1 | Working | The interactive mode is in progress. |
2 | End | The interactive mode ended or has been canceled. |
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Color;
using Leadtools.Drawing;
private void MyRasterViewerRectangleEventHandler(object sender, RasterViewerRectangleEventArgs e)
{
RasterImageViewer viewer = sender as RasterImageViewer;
RasterViewerRectangleEventArgs ee = new RasterViewerRectangleEventArgs(e.Status, e.Rectangle);
if (((e.Rectangle.Left > e.Rectangle.Right) || (e.Rectangle.Top > e.Rectangle.Bottom)) && e.Status == RasterViewerInteractiveStatus.End)
{
e.Cancel = true;
viewer.Invalidate();
if (!viewer.IsInteractiveModeBusy)
{
MessageBox.Show("Interactive mode (Rectangular region) cancelled");
viewer.InteractiveMode = RasterViewerInteractiveMode.None;
}
}
Console.WriteLine(@"" + e.Rectangle.Left + ", " + e.Rectangle.Top + ", " + e.Rectangle.Right + ", " + e.Rectangle.Bottom);
}
public void RasterImageViewer_IsInteractiveModeBusy(RasterImageViewer viewer)
{
viewer.InteractiveRegionRectangle += new EventHandler<RasterViewerRectangleEventArgs>(MyRasterViewerRectangleEventHandler);
viewer.InteractiveMode = RasterViewerInteractiveMode.Region;
viewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Rectangle;
MessageBox.Show("Interactive mode set to draw a rectangular region.\nIf mouse is dragged up or to the left, interactive mode is cancelled");
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document