TCustomImageList.DrawOverlay procedure
Renders an image with an overlay to the specified canvas.
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 its overlay are drawn. |
AX | Horizontal offset for the image on the canvas. |
AY | Vertical offset for the image on the canvas. |
AIndex | Ordinal position for the image drawn in the method. |
AOverlay | Position for the overlay image drawn in the method. |
AEnabled | Indicates if the image and overlay are drawn in the enabled state. |
ADrawEffect | Drawing effect applied to the image and the overlay. |
ADrawingStyle | Drawing style used for the image and overlay. |
AImageType | Indicates the image type (masked or unmasked). |
Description
DrawOverlay is an overloaded procedure used to draw the specified
image with an overlay. An overlay is an masked image drawn transparently over
another image. The overlay image is generally used to convey state or status
information about the image it adorns. The overlay images are stored in the
image list (or the resolution) just like the images they decorate.
ACanvas is the TCanvas instance where the image and the overlay
are rendered.
AX and AY contain the canvas offsets (horizontal and vertical) where the overlay image is drawn.
AIndex contains the ordinal position for the base image drawn in the method.
AOverlay contains the position in the Overlays property where the
index position for the overlay image is stored. The value in AOverlay must be
in the range 0..14 (the range defined in TOverlay).
ADrawingStyle contains the TDrawingStyle enumeration value applied
to the rendered image.
AImageType contains a TImageType enumeration value that indicates
if the image contains a mask.
ADrawEffect contains a TGraphicsDrawEffect enumeration value that
indicates the drawing effect applied to the rendered image.
Overloaded variants of the method are provided which use a drawing effect, drawing style, and image type arguments.
DrawOverlay uses the value in the Width property to retrieve the default image resolution used in the method. The TCustomImageListResolution instance calls its DrawOverlay method to render the image and overlay using the parameter values as arguments.
No actions are performed in the method when AIndex does not contain a valid index position in the image list.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
