MKI_BitmapFlattenImage (Bitmaps) Changed in Version 2020.1

www.CAD6.com

C++ Syntax

HBITMAP

MKI_BitmapFlattenImage(

 MKI_BITMAP_PTR f_pBitmap,

 __int32 f_nSourceX,

 __int32 f_nSourceY,

 __int32 f_nSourceDX,

 __int32 f_nSourceDY,

 __int32 f_nDestinDX,

 __int32 f_nDestinDY,

 MKI_COLORVALUE f_cBackColor );

 

Projects a 32-bit RGBA bitmap's section into a new plain bitmap with a defined background color (mainly for use in a treeview's image list).

 

If no longer used, the bitmap memory must be freed using the DeleteBitmap command of Windows.

 

Parameters

Bitmap

[MKI_BITMAP_PTR] Address of the alpha-channel source bitmap whose section shall be flattened.

SourceX

SourceY

[__int32] Zero-based offset of the upper left coordinate of the source section to be flattened.

SourceDX

SourceDY

[__int32] Size of the source section to be flattened.

DestinDX New in Version 2020.1

DestinDY

[__int32] Size of the bitmap to created. Should be less or equal to the source size.

BackColor

[MKI_COLORVALUE] Background color of the new bitmap section in RGB notation.

 

Return Value

Returns a non-zero bitmap handle if successful. This handle identifies a device dependent bitmap and can be used to display the bitmap on the screen. If zero is returned, the bitmap could not be created.

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH