OnInvertedText event (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

void __fastcall OnInvertedText (System::TObject* Sender, HRGN hTextRgn , int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight, int nWhiteCount, int nBlackCount);

Delphi Syntax

procedure OnInvertedText (Sender :TObject;hTextRgn: HRGN;nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight, iWhiteCount, iBlackCount : longint);

Overview

Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This event is triggered once for each area of inverted text that is detected. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the area inverted. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the area unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the InvertedText methodis set to INVERTEDTEXT_IMAGE_UNCHANGED | INVERTEDTEXT _SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

hTextRgn is only valid during this event. To use the hTextRgn after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements:

InvertedText method

Topics:

Raster Images: Cleaning - up 1-Bit Images