pxinq_text_extent (
Pint ws_id /*workstation identifier */ Pint index /*view index */ Pint font /*text font */ Ptext_prec precision /*text precision */
PPREC_STRING
string precision PPREC_CHAR
character precision PPREC_STROKE
stroke precision
Pfloat char_exp /*character expansion factor */ Pfloat spacing /*character spacing */ Pfloat height /*character height in MC */ Ptext_path text_path /*text path */
PPATH_RIGHT right PPATH_LEFT left PPATH_UP up PPATH_DOWN down
Phor_text_align horizontal /*horizontal alignment */
PHOR_NORM normal PHOR_LEFT left PHOR_CTR center PHOR_RIGHT right
Pvert_text_align vertical /*vertical alignment */
PVERT_NORM normal PVERT_TOP top PVERT_CAP cap PVERT_HALF half PVERT_BASE base PVERT_BOTTOM bottom
char *string /*text string */ Pint *error_ind /*error indicator */ Prect *extent /*text extent in TLC */ Ppoint *offset /*concatenation offset in TLC */
)
This function can be used to obtain the extent of hardware and software text strings, unlike Inquire Text Extent (routine pinq_text_extent) which provides information about software text strings only. It is a convenience interface to Escape function -2410. If Escape function -2410 is not supported by the workstation controller, this function calls Inquire Text Extent and does not report an error.
To request information about hardware text strings, specify text font 0 and string precision (PPREC_STRING) or character precision (PPREC_CHAR).
It is necessary to specify a view index because of the way that GPHIGS determines which hardware font to use. GPHIGS will use the largest hardware font whose height does not exceed the requested character height (or the smallest available hardware font if they all exceed the requested character height). To make this determination, GPHIGS must convert the specified character height in MC to a height in DC using the view transformation specified by the view index, and then select the appropriate hardware font to use in the text extent calculations.
The text extent is computed relative to the local 2D text coordinate system, with the text position at (0,0). The concatenation offset, with a suitable modeling transformation applied to account for the character up vector, indicates the text position for the concatenation of a subsequent text output primitive in the local 2D text coordinate system.
Inquire text extent, see pinq_text_extent