L_CreateMaskFromBitmapRgn
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_CreateMaskFromBitmapRgn(pBitmap, pMask, uStructSize)
pBITMAPHANDLE pBitmap; |
/* pointer to the source bitmap handle */ |
pBITMAPHANDLE pMask; |
/* pointer to the destination bitmap handle */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pBitmap */ |
Creates a 1-bit mask image from the region that is defined in the source bitmap.
Parameter |
Description |
pBitmap |
Pointer to the bitmap handle referencing the source bitmap, where the region is defined. |
pMask |
Pointer to the bitmap handle referencing the destination bitmap, which will be updated with a 1-bit, black-and-white image, where pixels from the region are white, and all others are black. |
uStructSize |
Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
A bitmap region is an area of interest within a bitmap. A bitmap can have only one region at a time, but the region can be complex, including, for example, multiple noncontiguous shapes. For more information, refer to Creating a Bitmap Region.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 95 / 98 / Me, Windows 2000 / XP.
See Also
Functions: |
|
|
|
Topics: |
|
|
|
|
Example
/* This example loads an image, sets a color region using black, */
/* and then creates a 1-bit mask image from that bitmap. */
BITMAPHANDLE LeadBitmap; /* Bitmap handle that holds the bitmap */
BITMAPHANDLE MaskBitmap; /* Bitmap handle that holds the mask bitmap */
L_LoadBitmap (TEXT("IMAGE1.CMP"), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL );
L_SetBitmapRgnColor ( &LeadBitmap, RGB( 0,0,0 ), L_RGN_SET );
L_CreateMaskFromBitmapRgn( &Bitmap, &MaskBitmap, sizeof(BITMAPHANDLE));