uFlags

Flags that determine the behavior of the border removal process. Flags may be combined using a bitwise OR (|). Possible values are:

Value

Meaning

HOLEPUNCH_SINGLE_REGION:

For each hole punch found by the HolePunchRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the HolePunchRemoveEvent event, the removed hole punch is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the hole punch is not added to the single region. When the HolePunchRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the removed hole punches. If HOLEPUNCH_LEAD_REGION is also set, the DocCleanBitmap property will be set to a bitmap that has a LEAD region that contains all the removed hole punches. If HOLEPUNCH_LEAD_REGION is not set, hDocCleanRgn is set to a Windows region that contains all the removed hole punches. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.

HOLEPUNCH_LEAD_REGION

When the HolePunchRemove method returns, the DocCleanBitmap property is updated with a copy of the bitmap that also contains a region with all the removed hole punches. This flag must be used in conjunction with HOLEPUNCH_SINGLE_REGION. To use this flag set uFlags to HOLEPUNCH_SINGLE_REGION | HOLEPUNCH_LEAD_REGION. The DocCleanBitmap property will be updated when the HolePunchRemove method returns.

HOLEPUNCH_IMAGE_UNCHANGED

The original image is unchanged.

HOLEPUNCH_USE_DPI

The unit of measure for all parameters of this method is thousandths of an inch. Use the image's DPI to convert to pixels. This allows the processing of many images with different DPI. If this flag is not set, the unit of measure for all fields of the HOLEPUNCH structure is pixels.

HOLEPUNCH_CALLBACK_REGION

The HolePunchRemoveEvent event receives a Windows region that contains the current hole punch to be removed. Setting this flag lets the user create his or her own composite of removed hole punches by combining the regions received by the event, if the DocCleanSuccess property was set to SUCCESS_REMOVE in the event. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when HOLEPUNCH_SINGLE_REGION is set in uFlags.

HOLEPUNCH_USE_SIZE

Use the iMinHoleWidth, iMinHoleHeight, iMaxHoleWidth, iMaxHoleHeight parameters of this method to indicate the size of the hole punches to remove. If this flag is not set, default values for the four sizes will be used. If HOLEPUNCH_USE_DPI is set, the defaults are calculated from the image DPI. Otherwise, the defaults are calculated from the image width and height.

HOLEPUNCH_USE_COUNT

Use the iMinHoleCount and iMaxHoleCount parameters of this method to indicate the number of hole punches to remove. If this flag is not set, default values for the two count values will be used. These default values are as follows: iMinHoleCount = 3 and iMaxHoleCount = 3.

HOLEPUNCH_USE_LOCATION

Use the iLocation parameter of this method to indicate the location of the hole punches to remove. If this flag is not set, a default of HOLEPUNCH_LEFT will be used.