TextExtent
Determine raster extent of text data.
Declaration
Source position: agraphics.pas line 2093
function TextExtent( |
Rp: PRastPort; |
String1: PChar; |
Count: LongInt; |
TextExtent: PTextExtent |
):LongInt; |
Arguments
Rp |
|
A pointer to the RastPort which describes where the text attributes reside. |
Count |
|
the number of characters in the string. If 0, there are no characters in the string. |
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 |