Back to Devexpress

TcxCustomImageList.AddBitmap(TBitmap,TBitmap,TColor,Boolean,Boolean) Method

vcl-cximagelist-dot-tcxcustomimagelist-dot-addbitmap-x28-vcl-dot-graphics-dot-tbitmap-vcl-dot-graphics-dot-tbitmap-vcl-dot-graphics-dot-tcolor-system-dot-boolean-system-dot-boolean-x29.md

latest4.6 KB
Original Source

TcxCustomImageList.AddBitmap(TBitmap,TBitmap,TColor,Boolean,Boolean) Method

Appends the specified bitmap and its transparency mask bitmap to the image list.

Declaration

delphi
function AddBitmap(AImage: TBitmap; AMask: TBitmap; AMaskColor: TColor; AStretch: Boolean; ASmooth: Boolean): Integer;

Parameters

NameTypeDescription
AImageTBitmap

A source image container.

| | AMask | TBitmap |

A transparency mask bitmap.

| | AMaskColor | TColor |

A transparency mask color.

| | AStretch | Boolean |

If True , the function upscales or downscales the image to fit the list dimensions. If False , divides the image into multiple images or truncates it as the Add function does.

| | ASmooth | Boolean |

If True , the function smooths the scaled image; otherwise, the function performs no additional operations on the image.

|

Returns

TypeDescription
Integer

The index of the image within a TBitmap container passed as the AImage parameter if the add operation is successful; otherwise, -1.

|

Remarks

In addition to the specified bitmap, you can pass its transparency mask bitmap as the AMask parameter. If nil (in Delphi) or nullptr (in C++Builder) is passed as the AMask parameter, the AddBitmap function generates a transparency mask bitmap based on a color passed as the AMaskColor parameter.

Note

The mask associated with the appended bitmap is ignored if the Masked property is set to False.

See Also

TcxCustomImageList.Add

TcxCustomImageList.AddIcon

TcxCustomImageList.AddImage

TcxCustomImageList.AddImages

TcxCustomImageList.AddMasked

TcxCustomImageList.Clear

TcxCustomImageList.Delete

TcxCustomImageList.FileLoad

TcxCustomImageList.GetInstRes

TcxCustomImageList.Insert

TcxCustomImageList.InsertIcon

TcxCustomImageList.InsertMasked

TcxCustomImageList.LoadImage

TcxCustomImageList.Replace

TcxCustomImageList.ReplaceIcon

TcxCustomImageList.ReplaceMasked

TcxCustomImageList.ResInstLoad

TcxCustomImageList.ResourceLoad

TcxCustomImageList Class

TcxCustomImageList Members

cxImageList Unit