[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Gets the ordinal position for the image closest to the requested size.
Source position: graphics.pp line 1675
public function TCustomIcon.GetBestIndexForSize( |
ASize: TSize |
):Integer; |
ASize |
|
TSize instance with the height and width for the requested image size. |
Ordinal position for the image, or -1 when no images are available.
The default icon size from GetSystemMetrics is used when ASize does not have explicit values in its cx and cy members. The best color depth is determined using the GetDeviceCaps routine for the screen context.
GetBestIndexForSize iterates over the items in the internal image list to find the TIconImage which most closely matches the required values. The return value is -1 if no images are stored in the internal image list for the icon.
Version 3.2 | Generated 2024-02-25 | Home |