Inserts a transparent image into the image resolutions at the specified position.
Source position: imglist.pp line 383
public procedure TCustomImageList.InsertMasked( |
Index: Integer; |
AImage: TCustomBitmap; |
MaskColor: TColor |
); |
Index |
|
The index for the inserted image. |
AImage |
|
The bitmap to be inserted. |
MaskColor |
|
The color used transparent areas in the image. |
InsertMasked is a procedure used to insert a transparent image into each of the resolutions for the image list.
Index contains the position in the image list where the transparent image is stored in each of the image resolutions.
AImage is a TCustomBitmap instance which contains the image inserted into the image list. No actions are performed in the method when AImage has not been assigned (contains Nil).
MaskColor is a TColor value which represents the transparent pixels in the image. Every pixel using the color in MaskColor is converted into a transparent pixel. InsertMasked creates a temporary TBitmap instance that is used to set the TransparentColor, TransparentMode, and Transparent properties in the image.
InsertMasked calls the CreateDefaultResolution method to ensure that the default resolution exists before inserting the image into the image list. The Resolutions enumerator is used to update each of the TCustomImageListResolution instances in the image list. The ScaleImage method is called to resize both the original image and the temporary mask to the Width and Height needed for the image resolution. The InternalInsert method in the image resolution is called to store the scaled 32-bit RGBA raw image data for the masked image.
|
Provides access to the image resolutions (or sizes) used in the image lists. |
|
|
Scales an image and its optional mask to the specified target size. |
|
|
Provides multiple image resolutions in TCustomImageList. |
|
|
Inserts an image into each image resolution at the specified position. |
Lazarus Component Library (LCL) | Version 3.99-1b97b99691 (2024-09-01) | Home |