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

TCustomImageListResolution.DrawOverlay

Draws the specified image with the given overlay.

Declaration

Source position: imglist.pp line 169

public procedure TCustomImageListResolution.DrawOverlay(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AOverlay: TOverlay;

  AEnabled: Boolean = True

); overload;

procedure TCustomImageListResolution.DrawOverlay(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AOverlay: TOverlay;

  ADrawEffect: TGraphicsDrawEffect

); overload;

procedure TCustomImageListResolution.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 rendered.

AX

  

Horizontal offset for the overlay image.

AY

  

Vertical offset for the overlay image.

AIndex

  

Ordinal position for the base image drawn in the method.

AOverlay

  

Position in the internal array with the index for an overlay image.

AEnabled

  

Indicates if the image is drawn in the enabled state.

Arguments

ACanvas

  

Canvas where the image and its overlay are rendered.

AX

  

Horizontal offset for the overlay image.

AY

  

Vertical offset for the overlay image.

AIndex

  

Ordinal position for the base image drawn in the method.

AOverlay

  

Position in the internal array with the index for an overlay image.

ADrawEffect

  

Drawing effect applied to the image and its overlay.

Arguments

ACanvas

  

Canvas where the image and its overlay are rendered.

AX

  

Horizontal offset for the overlay image.

AY

  

Vertical offset for the overlay image.

AIndex

  

Ordinal position for the base image drawn in the method.

AOverlay

  

Position in the internal array with the index for an overlay image.

ADrawingStyle

  

Drawing style applied to the image and its overlay.

AImageType

  

Image type for the requested image.

ADrawEffect

  

Drawing effect applied to the image and its 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 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 where the index for an overlay image was stored using Overlay. 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 content is an image or 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 the BlendColor, BkColor, DrawingStyle, and ImageType properties in ImageList as default values in the methods.

No actions are performed in the method when AIndex does not contain a valid index position in the resolution.

DrawOverlay requires a valid Reference instance to access the handles used for the image list and the resolution. The reference class calls its Draw method to render the base image represented by the value in AIndex to the specified canvas. Arguments passed to the method determine the drawing style or drawing effect applied to the rendered image.

The reference class is also used to render an overlay image indicated by the AOverlay parameter. The overlay image is drawn to the canvas at the offsets in AX and AY using the Width and Height for images in the resolution. The overlay image is not drawn if AOverlay contains a value outside the range allowed in TOverlay, or does not map to a valid image index in the image list.


Version 3.2 Generated 2024-02-25 Home