LEADTOOLS Raster Imaging C++ Class Library Help > LEADTOOLS Raster Imaging Features > Region Processing > Working with the Existing Bitmap Region |
You can save a region in the alpha channel of a 16- or 32-bit file. For an example, refer to LBitmapBase::SetAlpha.
You can use the LBitmapBase::HasRgn function to see if a bitmap has a region. If the bitmap has a region, you can do the following with it:
Use LPaint::FrameRgn to outline the region.
Display the region using functions described in Displaying a Region.
Use LBitmapRgn::GetRgnHandle to create a Windows region that is a snapshot of the bitmap region.
Use LBitmapRgn::Offset to move the region.
Use LBitmapRgn::GetRgnArea, LBitmapRgn::GetRgnBounds, and LBitmapRgn::IsPtInRgn to get information about the region's size and location.
Use LPaint::ColorRgn to display a filled, color representation of a region.
Determine the number of maximum number of segments present in any row in the region by calling LBitmapRgn::GetClipSegmentsMax. Once this is known, a buffer can be allocated and the segments can be retrieved using the LBitmapRgn::GetClipSegments function.
To create a new region, or update an existing region, based on either an HSV range or an RGB range, use the LBitmapRgn::SetRgnColorHSVRange function or the LBitmapRgn::SetRgnColorRGBRange function.
To create a new curve region, or update an existing region with a curve region, use LBitmapRgn::SetRgnCurve.
To resize a bitmap region a specific number of pixels, use the LBitmapRgn::ResizeRgn function.
Use LBitmapRgn::Free to free the region.
Use LBitmapRgn::Free to free the region.
To create a new curve region, or update an existing region with a curve region, use LBitmapRgn::SetRgnCurve.
To resize a bitmap region a specific number of pixels, use the LBitmapRgn::ResizeRgn function.
Use LBitmapRgn::HolesRemovalRgn to remove holes from a bitmap region.
Related Topics: