Determine raster length of text data.
Source position: agraphics.pas line 2401
function TextLength( |
rp: pRastPort; |
const string_: pCHAR; |
count: LongWord |
):SmallInt; |
rp |
|
A pointer to the RastPort which describes where the text attributes reside. |
string_ |
|
The address of string to determine the length of |
count |
|
The string length. If 0, there are no characters in the string. |
The number of pixels in x this text would occupy, not including any negative kerning that may take place at the beginning of the text string, nor taking into account the effects of any clipping that may take place.
This graphics function determines the length that text data would occupy if output to the specified RastPort with the current attributes. The length is specified as the number of raster dots: to determine what the current position would be after a GfxText() using this string, add the length to cp_x (cp_y is unchanged by GfxText()). Use the newer TextExtent() to get more information.
|
Count characters that will fit in a given extent |
|
|
Determine raster extent of text data. |
|
|
Write text characters (no formatting). |