DOTREMOVE

typedef struct tagDOTREMOVE 
{ 
   L_UINT uStructSize; 
   L_UINT uFlags; 
   L_INT iMinDotWidth; 
   L_INT iMinDotHeight; 
   L_INT iMaxDotWidth; 
   L_INT iMaxDotHeight; 
   pBITMAPHANDLE pBitmapRegion; 
   L_UINT uBitmapStructSize; 
   L_HRGN hRgn; 
} DOTREMOVE, *pDOTREMOVE; 

The DOTREMOVE structure provides dot removal information for the L_DotRemoveBitmap function.

Member Description
uStructSize Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
uFlags Flags that determine the behavior of the dot removal process. Flags may be combined using a bitwise OR (|). Possible values are:
  Value Meaning
  DOT_SINGLE_REGION For each dot encountered by L_DotRemoveBitmap, if the DOTREMOVECALLBACK function returns SUCCESS_REMOVE, the removed dot is added to an internal single region. If the callback returns SUCCESS_NOREMOVE, the dot is not added to the single region. When L_DotRemoveBitmap returns, either pBitmapRegion or hRgn will reference a region that contains all the removed dots. If DOT_LEAD_REGION is also set, pBitmapRegion will be updated with a shallow copy of pBitmap that has a LEAD region that contains all the removed dots. If DOT_LEAD_REGION is not set, hRgn is updated with a Windows region that contains all the removed borders. When the region (either LEAD or Windows) is no longer needed, it must be destroyed (either pBitmapRegion->pRgnInfo or hRgn).
  DOT_LEAD_REGION When L_DotRemoveBitmap returns, pBitmapRegion is updated with a shallow copy of pBitmap that also contains a region with all the removed dots. This flag must be used in conjunction with DOT_SINGLE_REGION. To use this flag declare a variable of type BITMAPHANDLE and point pBitmapRegion to this variable. This variable will be updated when L_DotRemoveBitmap returns.
  DOT_IMAGE_UNCHANGED The original image is unchanged.
  DOT_USE_DPI The unit of measure for all fields of the DOTREMOVE structure 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 DOTREMOVE structure is pixels.
  DOT_CALLBACK_REGION DOTREMOVECALLBACK receives a Windows region that contains the current dot to be removed. Setting this flag lets the user create his or her own composite of removed dots by combining the regions received by the callback function, if the callback function returns SUCCESS_REMOVE. The regions can be combined using a logical OR operator. Combining all regions received when the callback function returns SUCCESS_REMOVE results in a region identical to the region created when DOT_SINGLE_REGION is set in uFlags. For an example, refer to L_DotRemoveBitmap. When the region received by the callback function is no longer needed, it must be destroyed using DeleteObject().
  DOT_USE_SIZE Use the iMinDotWidth, iMinDotHeight, iMaxDotWidth, iMaxDotHeight members of the DOTREMOVE structure to indicate the size of the dots to remove. If this flag is not set, default values for the four sizes will be used. These defaults are as follows: iMinDotWidth = 1, iMinDotHeight = 1, iMaxDotWidth = 2 and iMaxDotHeight = 2.
  DOT_USE_DIAGONALS Considers pixels that are diagonal as part of the dot. Consider the "speck" below consisting of nine pixels.
    image\DotDiag.gif
    If DOT_USE_DIAGONALS is used, this speck is considered a single dot that is 5x5 pixels. If DOT_USE_DIAGONALS is not used, the speck is considered three dots (2x2, 1x1, 2x2).
  DOT_ALLFLAGS Use all flags, the value of this flag equals to (

DOT_USE_DPI                   |

DOT_SINGLE_REGION       |

DOT_LEAD_REGION          |

DOT_CALLBACK_REGION  |

DOT_IMAGE_UNCHANGED |

DOT_USE_SIZE                  |

DOT_USE_DIAGONALS)

iMinDotWidth The minimum width of a dot to be removed. If DOT_USE_DPI is set in uFlags, units are in thousandths of an inch, otherwise units are in pixels.
iMinDotHeight The minimum height of a dot to be removed. If DOT_USE_DPI is set in uFlags, units are in thousandths of an inch, otherwise units are in pixels.
iMaxDotWidth The maximum width of a dot to be removed. If DOT_USE_DPI is set in uFlags, units are in thousandths of an inch, otherwise units are in pixels.
iMaxDotHeight The maximum height of a dot to be removed. If DOT_USE_DPI is set in uFlags, units are in thousandths of an inch, otherwise units are in pixels.
pBitmapRegion Pointer to a variable of type BITMAPHANDLE. If DOT_SINGLE_REGION | DOT_LEAD_REGION have been set in uFlags, then when L_DotRemoveBitmap returns, this is updated with a shallow copy of pBitmap that also has a region that contains the removed dots. To use this, declare a variable of type BITMAPHANDLE and point pBitmapRegion to this variable. Set uFlags to (DOT_SINGLE_REGION | DOT_LEAD_REGION). It is the programmer's responsibility to free the region using L_FreeBitmapRgn() when it is no longer needed. Refer to the L_DotRemoveBitmap example to see how pBitmapRegion is used and freed.
uBitmapStructSize Size of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).
hRgn Handle to a windows region. When L_DotRemoveBitmap returns, this is updated with a single windows region corresponding to all changes, only if DOT_SINGLE_REGION has been set in uFlags and DOT_LEAD_REGION has not been set. To use this, set the flags field to (DOT_SINGLE_REGION). It is the programmer's responsibility to delete this region using the Windows C API DeleteObject() when the region is no longer needed.
Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help