GPR_$INQ_TEXT_OFFSET GPR Calls GPR_$INQ_TEXT_OFFSET
NAME
gpr_$inq_text_offset - returns the x- and y-offsets from the top left
pixel of a string to the origin of the string's first character.
FORMAT
gpr_$inq_text_offset (string, string_length, start, xy_end, status)
DESCRIPTION
This routine returns the x- and y-offsets from the top left pixel of a
string to the origin of the string's first character. This routine also
returns the x- or y-offset to the pixel which is the new current position
after the text is written with gpr_$text.
Input Parameters
string
A string, in gpr_$string_t format. This is a 256-element character
array.
string_length
Number of characters in the string. This is a 2-byte integer. The
maximum value is 256.
Output Parameters
start
X- and Y-offsets from the top left pixel of the string to the origin
of its first character, in gpr_$offset_t format. This data type is
4 bytes long.
xy_end
The X- or Y-offset from the top left pixel of the string to the
pixel that will be the new current position after the string is
written with gpr_$text. This is the X-offset when the text path is
specified as gpr_$right or gpr_$left. This is the Y-offset when the
text path is specified as gpr_$up or gpr_$down. This is a 2-byte
integer.
status
Completion status, in status_$t format.
SEE ALSO
gpr_$set_text_path, gpr_$text16_offset.
NOTES
A program can use the information derived from the "start" output parame-
ter to set the current position to the character origin, rather than the
top left corner of the string, before writing the string with gpr_$text.
When the text path is gpr_$right or gpr_$left, the offset is to the x-
axis. When the text path is gpr_$up or gpr_$down, the offset is to the
y-axis.
See gpr_$text16_offset to inquire the offsets for a 16-bit text string.