Sign in Join
FPDoc Onlineexperiment

TCustomImageList.AddMasked function

Member of TCustomImageListpublicIn unit ImgList

Adds an image(s) to the list using the MaskColor for transparent pixels.

Declaration

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

Arguments

Image

The bitmap to be added to the image list.

MaskColor

The color used as the transparent pixels in the image(s).

Function result

The index of the first added image, -1 if unsuccessful.

Description

AddMasked is an Integer function used to add one or more images specified in Image to the image list. Image can contain multiple images of the same width and height. The total image width must be a multiple of the Width property, and the image height must be the same as the Height property.

Every pixel in the image(s) with the color in MaskColor will become transparent in the stored image(s).

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.