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

TCustomImageList.DrawForPPI

Renders an image to a canvas scaled to a specified display density.

Declaration

Source position: imglist.pp line 362

public procedure TCustomImageList.DrawForPPI(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AImageWidthAt96PPI: Integer;

  ATargetPPI: Integer;

  ACanvasFactor: Double;

  AEnabled: Boolean = True

); overload;

procedure TCustomImageList.DrawForPPI(

  ACanvas: TCanvas;

  AX: Integer;

  AY: Integer;

  AIndex: Integer;

  AImageWidthAt96PPI: Integer;

  ATargetPPI: Integer;

  ACanvasFactor: Double;

  ADrawEffect: TGraphicsDrawEffect

); overload;

Arguments

ACanvas

  

Canvas where the image is rendered.

AX

  

Horizontal offset on the canvas where the image is drawn.

AY

  

Vertical offset on the canvas where the image is drawn.

AIndex

  

Ordinal position for the image drawn in the method.

AImageWidthAt96PPI

  

Width of the image in the default resolution.

ATargetPPI

  

Target display density (PPI) for the rendered image.

ACanvasFactor

  

Canvas scaling factor applied in the method.

AEnabled

  

Indicates if the image is rendered in the enabled state.

Arguments

ACanvas

  

Canvas where the image is rendered.

AX

  

Horizontal offset on the canvas where the image is drawn.

AY

  

Vertical offset on the canvas where the image is drawn.

AIndex

  

Ordinal position for the image drawn in the method.

AImageWidthAt96PPI

  

Width of the image in the default resolution.

ATargetPPI

  

Target display density (PPI) for the rendered image.

ACanvasFactor

  

Canvas scaling factor applied in the method.

ADrawEffect

  

Drawing effect applied to the rendered image.

Description

DrawForPPI is an overloaded procedure used to render an image at the specified position to a canvas scaled to the specified display density.

ACanvas is a TCanvas instance where the image is rendered.

AX and AY contains the offsets on the canvas where the image is drawn.

AIndex is the position in the image list for the image rendered in the method.

AImageWidthAt96PPI is the width of the image using the default resolution.

ATargetPPI is the display density (Pixels per Inch) requested in the method.

ACanvasFactor is a Double value that indicates the canvas scaling factor applied to the rendered image.

ADrawEffect indicate the drawing effect used for the rendered image.

AEnabled indicates that the image drawn in the "enabled" state.

DrawForPPI calls the GetResolutionForPPI method to locate the image resolution for the target display density. The TCustomImageListResolution instance calls its Draw method to render the image to the canvas with the requested drawing effect.


Version 3.2 Generated 2024-02-25 Home