Sign in Join
FPDoc Onlineexperiment

TCustomImageList.Insert procedure

Member of TCustomImageListpublicIn unit ImgList

Inserts an image into each image resolution at the specified position.

Declaration

pascal
procedure Insert(AIndex: Integer; AImage: TCustomBitmap; 
 AMask: TCustomBitmap)

Arguments

AIndex

Ordinal position where the image is stored.

AImage

Bitmap image stored in the method.

AMask

Transparency mask, Nil for opaque.

Description

Insert is a procedure used to insert an image into each of the resolutions for the image list at the ordinal position specified in AIndex.

AImage is a TCustomBitmap instance that contains the image data stored in the image list. No actions are performed in the method when AImage is unassigned (contain Nil).

AMask is a TCustomBitmap instance that contains the mask that defines the transparent areas in the image. When AMask is Nil, no transparent areas are defined in AImage. Use InsertMasked to insert bitmaps with a specific transparent color.

Insert calls the CreateDefaultResolution method to ensure that the default image resolution has been created using the value in the Width property.

Insert uses the Resolutions enumerator to visit each of the TCustomImageListResolution instances used in the image list. The ScaleImage method is called to resize the bitmaps in AImage and Mask to the image width for the resolution. The InternalInsert method for the image resolution is called to store the scaled raw image data at the position in AIndex.

See also

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