Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
InvertedTextCommandEventArgs Class
See Also  Members   Example 
Leadtools.ImageProcessing.Core Namespace : InvertedTextCommandEventArgs Class




Handles each inverted text segment found by InvertedTextCommand.

Syntax

Visual Basic (Declaration) 
Public Class InvertedTextCommandEventArgs 
   Inherits EventArgs
Visual Basic (Usage)Copy Code
Dim instance As InvertedTextCommandEventArgs
C# 
public class InvertedTextCommandEventArgs : EventArgs 
Managed Extensions for C++ 
public __gc class InvertedTextCommandEventArgs : public EventArgs 
C++/CLI 
public ref class InvertedTextCommandEventArgs : public EventArgs 

Example

Visual BasicCopy Code
ImageProcessing.Core.InvertedTextCommandEventArgs.InvertedTextCommandEventArgs
   Public WithEvents invertedTextCommand_S4 As InvertedTextCommand
   Public Sub InvertedTextCommandEventArgsExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Clean.tif")

      ' Prepare the command
      invertedTextCommand_S4 = New InvertedTextCommand(InvertedTextCommandFlags.UseDpi Or InvertedTextCommandFlags.CallBackRegion, 5000, 500, 70, 95)
      invertedTextCommand_S4.Run(leadImage)

      RasterCodecs.Shutdown()
   End Sub

   Private Sub InvertedTextCommand_InvertedText_S4(ByVal sender As Object, ByVal e As InvertedTextCommandEventArgs) Handles invertedTextCommand_S4.InvertedText
      Dim ee As InvertedTextCommandEventArgs = New InvertedTextCommandEventArgs(e.Image, e.Region, e.BoundingRectangle, e.WhiteCount, e.BlackCount)
      e.Status = RemoveStatus.Remove
      If Not (e.Region Is Nothing) Then
         e.Image.AddGdiPlusRegionToRegion(Nothing, e.Region, RasterRegionCombineMode.AndNotRegion)
      End If
   End Sub
C#Copy Code
ImageProcessing.Core.InvertedTextCommandEventArgs.InvertedTextCommandEventArgs 
      public void InvertedTextCommandEventArgsExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Clean.tif"); 
 
         // Prepare the command 
         InvertedTextCommand command = new InvertedTextCommand( InvertedTextCommandFlags.UseDpi | InvertedTextCommandFlags.CallBackRegion, 5000, 500, 70, 95); 
         command.InvertedText += new EventHandler<InvertedTextCommandEventArgs>(InvertedTextEvent_S4); 
         command.Run(image); 
 
         RasterCodecs.Shutdown(); 
      } 
 
      private void InvertedTextEvent_S4(object sender, InvertedTextCommandEventArgs e) 
      { 
         InvertedTextCommandEventArgs ee = new InvertedTextCommandEventArgs(e.Image, e.Region, e.BoundingRectangle, e.WhiteCount, e.BlackCount); 
         e.Status = RemoveStatus.Remove; 
 
         if(e.Region != null) 
         { 
            e.Image.AddGdiPlusRegionToRegion(null, e.Region, RasterRegionCombineMode.AndNotRegion); 
         } 
      }

Inheritance Hierarchy

System.Object
   System.EventArgs
      Leadtools.ImageProcessing.Core.InvertedTextCommandEventArgs

Requirements

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

See Also