TBitmap32.TextExtent

function TextExtent(const Text: String): TSize;

function TextExtentW(const Text: Widestring): TSize;

Description

Returns the width and height, in pixels, of a string rendered in the current Font.

Note, that the size returned by this function may differ from the actual width of the text produced by RenderText function, especially when using raster fonts.

 

Please note that the CLX versions of the non-Unicode methods do also default to Widestring because that is the native QT string format.

 

See Also

RenderText, TextHeight, TextOut, TextWidth, Font, TSize