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 L_SetBitmapAlpha.

You can use the L_BitmapHasRgn function to see if a bitmap has a region. If the bitmap has a region, you can do the following with it:

image\sqrblit.gif Use L_FrameBitmapRgn to outline the region.

image\sqrblit.gif Display the region using functions described in Displaying a Region.

image\sqrblit.gif Use L_GetBitmapRgnHandle to create a Windows region that is a snapshot of the bitmap region.

image\sqrblit.gif Use L_OffsetBitmapRgn to move the region.

image\sqrblit.gif Use L_GetBitmapRgnArea, L_GetBitmapRgnBounds, and L_IsPtInBitmapRgn to get information about the region's size and location.

image\sqrblit.gif Use L_ColorBitmapRgn to display a filled, color representation of a region.

image\sqrblit.gif Use L_FreeBitmapRgn to free the region.

image\sqrblit.gif Determine the number of maximum number of segments present in any row in the region by calling L_GetBitmapClipSegmentsMax. Once this is known, a buffer can be allocated and the segments can be retrieved using the L_GetBitmapClipSegments function.

To create a new region, or update an existing region, based on either an HSV range or an RGB range, use L_SetBitmapRgnColorHSVRange or L_SetBitmapRgnColorRGBRange. To convert between HSV and RGB color space, use the L_HSVtoRGB and the L_RGBtoHSV functions.

To create a new curve region, or update an existing region with a curve region, use L_SetBitmapRgnCurve.

To resize a bitmap region a specific number of pixels, use the L_ResizeBitmapRgn function.

Use L_HolesRemovalBitmapRgn to remove holes from a bitmap region.

Related Topics

image\sqrblit.gif Saving a Region