Vcl.ImgList.TCustomImageList.AddMasked

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddMasked(Image: TBitmap; MaskColor: TColor): Integer;

C++

int __fastcall AddMasked(Vcl::Graphics::TBitmap* Image, System::Uitypes::TColor MaskColor);

Properties

Type Visibility Source Unit Parent
function public
Vcl.ImgList.pas
Vcl.ImgList.hpp
Vcl.ImgList TCustomImageList

Description

Adds an image to the image list along with a color which is used to generate the transparent mask.

AddMasked is similar to Add except that a mask bitmap is not specified. Instead, a color that can be used to automatically generate the masks is specified. Each pixel of the specified color in the image bitmap is changed to black, and the corresponding bit in the mask is set to one. As a result, any pixel in the image that matches the specified color is transparent when the image is drawn. AddMasked returns -1 if it fails, 0 if it's successful.

See Also