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

TextExtent

Determine raster extent of text data.

Declaration

Source position: agraphics.pas line 2155

procedure TextExtent(

  Rp: PRastPort;

  const String_: PChar;

  Count: LongWord;

  TextExtent_: PTextExtent

);

Arguments

Rp

  

A pointer to the RastPort which describes where the text attributes reside.

String_

  

The address of the string to determine the length of.

Count

  

the number of characters in the string. If 0, there are no characters in the string.

TextExtent_

  

A structure to hold the result.

Description

This function determines a more complete metric of the space that a text string would render into than the TextLength() function.

TextExtent_ is filled in as follows:

te_Width
same as TextLength() result: the RastPort current x position advance that rendering this text would cause.
te_Height
same as tf_YSize. The height of the font.
te_Extent.MinX
the offset to the left side of the rectangle this would render into. Often zero.
te_Extent.MinY
same as -tf_Baseline. The offset from the baseline to the top of the rectangle this would render into.
te_Extent.MaxX
the offset of the left side of the rectangle this would render into. Often the same as te_Width - 1.
te_Extent.MaxY
same as tf_YSize - tf_Baseline - 1. The offset from the baseline to the bottom of the rectangle this would render into.

See also

TextLength

  

Determine raster length of text data.

GfxText

  

Write text characters (no formatting).

TextFit

  

Count characters that will fit in a given extent


Documentation generated on: 2021-07-30