OnHolePunchRemove event (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

void __fastcall OnHolePunchRemove (System::TObject* Sender, HRGN hHoleRgn, int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight, int iHoleIndex, int iHoleTotalCount, int iWhiteCount, int iBlackCount);

Delphi Syntax

procedure OnHolePunchRemove (Sender : TObject;hHoleRgn : HRGN; nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight, iHoleIndex, iHoleTotalCount, iWhiteCount, iBlackCount: LongInt) ;

Overview

Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical) This event is triggered once for each occurring hole in the hole-punch configuration. For example, if there are three holes, the event gets triggered three times. Set the DocCleanSuccess property to SUCCESS_REMOVE to have a particular hole removed. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the hole unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the HolePunchRemove method is set to HOLEPUNCH_IMAGE_UNCHANGED and HOLEPUNCH_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

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

See Also

Elements:

HolePunchRemove method

Topics:

Raster Images: Cleaning - up 1-Bit Images