[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ImgList' (#lcl)

TCustomImageList.DrawOverlay

Renders an image with an overlay to the specified canvas.

Declaration

Source position: imglist.pp line 366

public procedure TCustomImageList.DrawOverlay(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AOverlay: TOverlay;

  AEnabled: Boolean = True

); overload;

procedure TCustomImageList.DrawOverlay(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AOverlay: TOverlay;

  ADrawEffect: TGraphicsDrawEffect

); overload;

procedure TCustomImageList.DrawOverlay(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AOverlay: TOverlay;

  ADrawingStyle: TDrawingStyle;

  AImageType: TImageType;

  ADrawEffect: TGraphicsDrawEffect

); overload;

Arguments

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.

Arguments

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.

ADrawEffect

  

Drawing effect applied to the image and the overlay.

Arguments

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.

ADrawingStyle

  

Drawing style used for the image and overlay.

AImageType

  

Indicates the image type (masked or unmasked).

ADrawEffect

  

Drawing effect applied to the image and the overlay.

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

TCustomImageList.Width

  

Width of images in the default resolution for the image list.

TCustomImageList.GetResolution

  

Gets the value for the indexed Resolution property.

TCustomImageListResolution.DrawOverlay

  

Draws the specified image with the given overlay.

TDrawingStyle

  

Defines drawing styles for images.

TOverlay

  

Represents the valid index positions used to access overlay image assignments.

TGraphicsDrawEffect


Version 3.2 Generated 2024-02-25 Home