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

TCustomSpeedButton.DrawGlyph

Draws the glyph image on the canvas at a given offset in the specified client rectangle.

Declaration

Source position: buttons.pp line 403

protected function TCustomSpeedButton.DrawGlyph(

  ACanvas: TCanvas;

  const AClient: TRect;

  const AOffset: TPoint;

  AState: TButtonState;

  ATransparent: Boolean;

  BiDiFlags: LongInt

):TRect; virtual;

Arguments

ACanvas

  

Canvas where the control is glyph is drawn.

AClient

  

Client rectangle for the drawing operation.

AOffset

  

Offset into the client rectangle where the glyph is drawn.

AState

  

Button state drawn for the control.

ATransparent

  

True if the glyph image is drawn with transparency.

BiDiFlags

  

Not used in the current implementation.

Function result

TRect instance used to draw the glyph bitmap.

Description

Uses the internal TButtonGlyph instance for the control (when assigned) to access its Draw method. The PixelsPerInch setting in Font and the Canvas scaling factor for the control are used to scale the image.

The return value is a TRect instance with are needed to draw the glyph image on the the specified canvas. Its member values are set to 0 (zero) when a TButtonGlyph instance has not been assigned by setting a Glyph bitmap for the control.


Version 3.2 Generated 2024-02-25 Home