[Overview][Types][Classes][Procedures and functions][Index] |
Finds the image resolution with the best size for scaling to the target width.
Source position: imglist.pp line 241
public function TCustomImageListResolutions.FindBestToScaleFrom( |
const ATargetWidth: Integer |
):Integer; |
ATargetWidth |
|
Target width for the scaled image resolution. |
Source image resolution to use for scaling to the target width.
FindBestToScaleFrom is an Integer function used to find the image resolution that is the best candidate for scaling images to the specified target width.
ATargetWidth contains the image width to locate in the resolutions stored in the container.
The return value contains the ordinal position for the image resolution selected as the source for images.
FindBestToScaleFrom calls the Find method to locate an existing image resolution that matches the value in ATargetWidth. If an existing image resolution is not found that uses the image width in ATargetWidth, the FindBestToCopyFrom method is called to search all resolutions for the best candidate for the target image width.
FindBestToScaleFrom is used in the implementation of the StretchDraw method in TCustomImageList.
|
Draws an image stretched to the dimensions for the target rectangle. |
Version 4.0 | Generated 2025-05-03 | Home |