Sign in Join
FPDoc Onlineexperiment

TCustomImageList.ReplaceMasked procedure

Member of TCustomImageListpublicIn unit ImgList

Replaces the image at the specified position with a masked image.

Declaration

pascal
procedure ReplaceMasked(Index: Integer; NewImage: TCustomBitmap; 
 MaskColor: TColor; 
 const AllResolutions: Boolean=True)

Arguments

Index

Ordinal position for the image replaced in the method.

NewImage

Bitmap image stored in the method.

MaskColor

The color used for transparent pixels the image.

AllResolutions

Description

ReplaceMasked is a procedure used to replace the image stored at the specified position with a masked image.

Index is an Integer value that contains the ordinal position in the image list for the image replaced in the method.

NewImage is a TCustomBitmap instance that contains the image data used in the method. No actions are performed in the method when NewImage has not been assigned (contains Nil).

MaskColor contains a TColor value that represents transparent pixels in the image. Every pixel in the image using the color in MaskColor is converted to a transparent pixel.

AllResolutions indicates if all resolutions in the image list are affected in the method. When AllResolutions contains False, only the resolution using the Width in NewImage is updated with the new image data. When AllResolutions contains True, the Resolutions enumerator is used to scale and store the image for each TCustomImageListResolution instance.

ReplaceMasked creates a temporary TBitmap instance that is used to update the TransparentColor and Transparent properties for the image. It is also used when the image is scaled for the various image resolutions.

See also

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