AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.TextWidth(str): double

Description

Computes the width of string.

This method together with the FontHeight method provide a way to measure the extent of a text for layouting operations.

Prior to calling this method some font should be selected with Font method.

Parameters

str: AnsiString

Text string for horizontal extent computation.

Returns

If non-zero, returned is the length of the text [in subpixels].

If zero, the text was empty or no font has been selected yet.