CombineBMP  Method

Description         This method will combine two device dependent bitmaps (BMP) with a mask. The mask is also a device independent bitmap. The mask should be used to combine the source bitmap with the destination bitmap.

Syntax                 lRet = [BiDib.]CombineBMP X Y Dest Src Mask Mode

Remarks             lRet                         LONGLONG New bitmap on success, 0 if failed.

                            X                             short                The destination X coordinate of the source bitmap on the destination bitmap.

                            Y                             short                The destination Y coordinate of the source bitmap on the destination bitmap.

                            Dest                        LONGLONG The destination BMP, if 0 handle then create an empty BMP and use it as the destination.

                            Src                          LONGLONG The source BMP.

                            Mask                      LONGLONG The mask BMP.

                            Mode                      short                The masking mode Opaque or Transparent. combopaque and combTransparent.

 

If the bitmap has deferent planes follow the following rules:

If the source BMP and mask BMP have different bit per planes than the destination:

first convert the source BMP and the mask BMP to the same bit per planes as the destination BMP. The result will be combined.

The size of the source and the mask BMP must be equal.

 

Other rules:

a.      If the destination BMP is NULL then create a destination BMP based on the source.

b.     If the mask BMP is NULL combine source with destination.

c.      If the mask BMP and destination BMP is NULL then just return the source.

See Also