[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ImgList' (#lcl)

TCustomImageList.ReplaceMasked

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

Declaration

Source position: imglist.pp line 391

public procedure TCustomImageList.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.

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

TCustomImageList.GetResolution

  

Gets the value for the indexed Resolution property.

TCustomImageList.Resolutions

  

Provides access to the image resolutions (or sizes) used in the image lists.

TCustomImageList.InsertMasked

  

Inserts a transparent image into the image resolutions at the specified position.

TCustomImageList.AddMasked

  

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

TCustomImageListResolutions

  

Provides multiple image resolutions in TCustomImageList.

TCustomImageListResolution

  

Implements an image resolution (or size) used in TCustomImageList.


Version 3.2 Generated 2024-02-25 Home