Unit 'agraphics' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#aros]

TextLength

Determine raster length of text data.

Declaration

Source position: agraphics.pas line 2051

function TextLength(

  Rp: PRastPort;

  const string_: PChar;

  Count: LongWord

):SmallInt;

Arguments

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.

Function result

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.

Description

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.

See also

TextFit

  

Count characters that will fit in a given extent

TextExtent

  

Determine raster extent of text data.

GfxText

  

Write text characters (no formatting).


Documentation generated on: 2021-07-30