Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂TBitmap32🞂TextExtentMethodPublic

TBitmap32.TextExtent

Calculates the pixel width and height dimensions of a text string when rendered using current Font.

Declaration ​

pascal
function TextExtent(const Text: string): TSize;

Parameters ​

ParameterTypeDescription
TextstringText string to measure.

Returns ​

TypeDescription
TSizeA TSize record containing calculated width (cX) and height (cY) in pixels.

Description ​

TextExtent queries backend text support (ITextSupport) to determine the pixel dimensions required to render Text using the bitmap's current Font.

See also ​