Inserts an Icon into each of the resolutions for the image list.
Source position: imglist.pp line 382
public procedure TCustomImageList.InsertIcon( |
AIndex: Integer; |
AIcon: TCustomIcon |
); |
AIndex |
|
Position in the image list where the icon is inserted. |
AIcon |
|
The Icon to insert into the image list. |
InsertIcon is a procedure used to insert an icon at the specified position in each of the resolutions for the image list.
AIndex contains the ordinal position in the image list where the icon is stored.
AIcon is the TCustomIcon instance stored in the method. AIcon allows multiple icon sizes to be available in the class instance. No actions are performed in the method when AIcon is unassigned (contains Nil). To ensure that the icon sizes in AIcon are in ascending size order, a temporary TIcon instance is created and its Sort method is called.
InsertIcon uses the Resolutions enumerator to visit each of the image resolutions used in the image list. GetBestIconIndexForSize is called for each image resolution to get the icon size for the width in the resolution. ScaleImage is called to resize the icon bitmap and mask (when present) to the height and width required for the image resolution. The InternalInsert method in the image resolution is called to store the scaled raw image data for the icon at the position in AIndex.
|
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. |
|
|
Implements an image resolution (or size) used in TCustomImageList. |
|
|
TCustomIcon - base class for TIcon. |
Lazarus Component Library (LCL) | Version 3.99-1b97b99691 (2024-09-01) | Home |