pinq_text_extent(3g) — Subroutines
Name
pinq_text_extent − Returns information about the text extent of a character string.
Operating States: PHOP, ∗, ∗, ∗
PHIGS standard function
Syntax
void pinq_text_extent (
Pint wstype, /∗ (I) Workstation type ∗/
Pint font, /∗ (I) Text font ∗/
Pfloat expfac, /∗ (I) Character expansion factor ∗/
Pfloat spacing, /∗ (I) Character spacing ∗/
Pfloat height, /∗ (I) Character height ∗/
Ptext_path path, /∗ (I) Text path ∗/
Phor_text_align align_horz, /∗ (I) Horizontal text alignment ∗/
Pvert_text_align align_vert, /∗ (I) Vertical text alignment ∗/
const char ∗string, /∗ (I) Text string ∗/
Pint ∗error_ind, /∗ (O) Error indicator ∗/
Prect ∗extent, /∗ (O) Text extent rectangle, in the
order XMIN, XMAX, YMIN, YMAX ∗/
Ppoint ∗offset /∗ (O) Concatenation offset ∗/
)
Data Structures
typedef enum {
PPATH_RIGHT, /∗ text path right ∗/
PPATH_LEFT, /∗ text path left ∗/
PPATH_UP, /∗ text path up ∗/
PPATH_DOWN /∗ text path down ∗/
} Ptext_path;
typedef enum {
PHOR_NORM, /∗ normal horizontal alignment ∗/
PHOR_LEFT, /∗ left horizontal alignment ∗/
PHOR_CTR, /∗ center horizontal alignment ∗/
PHOR_RIGHT /∗ right horizontal alignment ∗/
} Phor_text_align;
typedef enum {
PVERT_NORM, /∗ normal vertical alignment ∗/
PVERT_TOP, /∗ top vertical alignment ∗/
PVERT_CAP, /∗ cap vertical alignment ∗/
PVERT_HALF, /∗ half vertical alignment ∗/
PVERT_BASE, /∗ base vertical alignment ∗/
PVERT_BOTTOM /∗ bottom vertical alignment ∗/
} Pvert_text_align;
typedef struct {
Ppoint p; /∗ point p, lower left ∗/
Ppoint q; /∗ point q, upper right ∗/
} Prect;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
} Ppoint;
Description
pinq_text_extent returns information about the text extent of a character string, including the text extent rectangle and the concatenation point.
Digital PHIGS computes the text extent of the specified character string using the specified attributes: text font, character expansion factor, character spacing, character height, text path, and text alignment. Digital PHIGS assumes STROKE precision.
The concatenation offset indicates the text position for the concatenation of a subsequent text string.
See Also
panno_text_rel
pset_char_ht
pset_char_space
pset_char_up_vec
pset_text_align
pset_text_font
pset_text_path
pset_text_prec
ptext