TScaledImageListResolution.DrawOverlay procedure
Draws an image with an overlay at the specified canvas position.
Declaration
procedure DrawOverlay(ACanvas: TCanvas; AX: Integer; AY: Integer;
AIndex: Integer; AOverlay: TOverlay;
AEnabled: Boolean=True); overload
procedure DrawOverlay(ACanvas: TCanvas; AX: Integer; AY: Integer;
AIndex: Integer; AOverlay: TOverlay;
ADrawEffect: TGraphicsDrawEffect); overload
procedure DrawOverlay(ACanvas: TCanvas; AX: Integer; AY: Integer;
AIndex: Integer; AOverlay: TOverlay;
ADrawingStyle: TDrawingStyle;
AImageType: TImageType;
ADrawEffect: TGraphicsDrawEffect); overloadArguments
ACanvas | Canvas where the image and overlay are drawn. |
AX | Horizontal coordinate on the canvas where the image is drawn. |
AY | Vertical coordinate on the canvas where the image is drawn. |
AIndex | Ordinal position for the image drawn in the method. |
AOverlay | Position for the overlay image applied in the method. |
AEnabled | True when the image is drawn in the enabled state (default). |
ADrawEffect | TGraphicsDrawEffect value applied to the image. |
ADrawingStyle | TDrawingStyle value applied to the image. |
AImageType | Indicates if the content is the image or a mask. |
Description
DrawOverlay is an overloaded method used to draw an image with an
overlay at the given position on a canvas. The overloaded variants allow the
enabled state, drawing effect, or drawing style for the image(s) to be
specified.
DrawOverlay scales both the image and the overlay (when needed) using the
internal scaling factor stored in the image Resolution.
Image scaling is not performed when the scaling factor is 1.0. In this case
the Draw method in Resolution is called to draw the image. When a
valid image index has been assigned in AOverlay, The Draw method
is called to draw the overlay image.
When image scaling is needed, the StretchDraw method in Resolution
is called to draw both the image and a valid overlay. The images are resized
to the Width and Height for the image Resolution.
StretchDraw uses the enabled state for the images when ADrawEffect
contains any value other than gdeDisabled.
Use the Draw or StretchDraw methods when an overlay
image is not needed.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
