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

TCanvas.GetTextMetrics

Gets text metrics for the canvas font.

Declaration

Source position: graphics.pp line 1135

public function TCanvas.GetTextMetrics(

  out TM: TLCLTextMetric

):Boolean; virtual;

Arguments

TM

  

Structure with the text metrics.

Function result

True on success.

Description

Calls RequiredState to check state flags for the canvas, and ensure that the Handle and the Font are valid. RequiredState raises an Exception if the Handle for the canvas is not valid.

Calls GetTextMetrics in the LCL interface to retrieve the ascender, descender, and height metrics for the canvas Handle. The values are assigned to members in the TM output argument.

The return value is True when text metrics were successfully retrieved from the widgetset.


Version 3.2 Generated 2024-02-25 Home