TCustomImageListResolution.StretchDraw procedure
Draws an image stretched to the dimensions for the target rectangle.
Declaration
procedure StretchDraw(Canvas: TCanvas; Index: Integer; ARect: TRect;
Enabled: Boolean=True)Arguments
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. |
Description
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 compares the image size (using the Height and
Width properties) to the size of the target rectangle in ARect.
When they are the same size, the Draw method is used to render the specified
image. When the sizes are different, the StretchDraw method in
ACanvas is used to render the image bitmap expanded or contracted to fit
within the specified boundaries.
StretchDraw is used in the implementation of the Draw and
DrawOverlay methods in TScaledImageListResolution.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
