Draws an image stretched to the dimensions for the target rectangle.
Source position: imglist.pp line 393
public procedure TCustomImageList.StretchDraw( |
Canvas: TCanvas; |
Index: Integer; |
ARect: TRect; |
Enabled: Boolean = True |
); |
Canvas |
|
Canvas used for the drawing operation. |
Index |
|
Ordinal position for the image drawn in the method. |
ARect |
|
Rectangle coordinates used for the draw operation. |
Enabled |
|
Indicates if the image is drawn using the enabled display state. |
StretchDraw is a procedure used to render an image stretched to the required dimensions on the specified canvas.
Canvas is the TCanvas instance where the image is rendered using the dimensions in the target rectangle.
Index contains the ordinal position for the image drawn in the method.
ARect is a TRect instance that contains the Top, Left, Bottom, and Right coordinates for the canvas. The rendered image must fit with in these boundaries on the canvas.
Enabled indicates if the image is drawn using its "enabled" state. When Enabled is True, the gdeEnabled drawing effect is used for the rendered image. When Enabled is False, the gdeDisabled drawing effect is used.
StretchDraw searches the images resolutions in the image list to locate the best scaling candidate for the width represented in ARect. If a suitable TCustomImageListResolution is located for the operation, its StretchDraw method is called using the parameter values as arguments. No actions are performed in the method if a suitable scaling candidate resolution is not found.
|
Finds the image resolution with the best size for scaling to the target width. |
|
|
Draws an image stretched to the dimensions for the target rectangle. |
Lazarus Component Library (LCL) | Version 3.99-1b97b99691 (2024-09-01) | Home |