Skip to main content

TdxNavBarCustomImagePainter.DrawImage(TCanvas,TCustomImageList,Integer,TRect,Boolean,IdxColorPalette) Method

Draws a specific image from an image list.

Declaration

class function DrawImage(ACanvas: TCanvas; AImageList: TCustomImageList; AImageIndex: Integer; const ARect: TRect; AEnabled: Boolean = True; AColorPalette: IdxColorPalette = nil): Boolean;

Parameters

Name Type
ACanvas TCanvas
AImageList TCustomImageList
AImageIndex Integer
ARect TRect
AEnabled Boolean
AColorPalette IdxColorPalette

Returns

Type
Boolean

Remarks

You can use this method when implementing custom draw of NavBar elements. Commonly it is called for drawing:

The image to draw is obtained from the image list (AImageList) by its zero-based index (AImageIndex).

The ACanvas parameter specifies the graphic surface on which it is drawn.

Set the AEnabled parameter to False to paint the image grayed out.

The DrawImage method draws the entire image starting at the top-left point of the rectangle R.

For a vector image, you can use the optional AColorPalette parameter to specify a palette that provides named colors to paint outlines and fill enclosed polygons of the image. The DrawImage method ignores the specified palette if the image is a bitmap.

Note

For 32-bit images, use the TcxImageList component shipped with the Express Cross Platform Library.

See Also