[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference
INQUIRE TEXT EXTENT (PHOP,*,*,*)
Purpose
Use
Inquire Text Extent
to inquire the extent of the specified character
string in the local 2D text coordinate system.
The graPHIGS API uses the specified text attributes for
the specified workstation type to compute the extent.
STROKE precision is assumed. The
text position is (0,0)
in the local 2D text coordinate system.
Possible text path attributes include:
RIGHT, LEFT, UP or DOWN.
The horizontal alignment for the text may be set
to NORMAL, LEFT, CENTER, or
RIGHT, and the vertical text alignment may be set
to NORMAL, TOP, CAP,
HALF, BASE or BOTTOM.
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. This includes
for text paths RIGHT and LEFT,
a suitable modification to adjust
for the intercharacter spacing of the last character as specified
by the character spacing parameter.
If the information is available, then the graPHIGS API sets
the error indicator to zero and returns the values in
the output parameters.
If the information is unavailable,
then the values returned in the output parameters
are unpredictable and the graPHIGS API sets the error indicator
to one of the following errors:
- 2
- Function Requires State (PHOP,*,*,*)
- 52
- Workstation Type Not Recognized By Implementation
- 51
- Information Not Available For Generic Workstation Type
- 62
- This Information Not Available For MO Workstation Type
- 106
- Specified Font Not Available For Requested Text Precision
Language Bindings
C
pinq_text_extent
(ws_type,
text_font, char_expan, char_space, char_ht,
text_path, hor_text_align, vert_text_align,
char_string, err_ind, rect, offset) |
Pint ws_typeWorkstation type.
Pint text_fontText font.
Pfloat char_expanCharacter expansion factor.
Pfloat char_spaceCharacter spacing.
Pfloat char_htCharacter height.
Ptext_path text_pathText path
(0=PPATH_RIGHT,
1=PPATH_LEFT, 2=PPATH_UP,
3=PPATH_DOWN).
Phor_text_align hor_text_alignHorizontal text alignment
(0=PHOR_NORM, 1=PHOR_LEFT,
2=PHOR_CTR, 3=PHOR_RIGHT).
Pvert_text_align vert_text_alignVertical text alignment
(0=PVERT_NORM,
1=PVERT_TOP, 2=PVERT_CAP,
3=PVERT_HALF, 4=PVERT_BASE, 5=PVERT_BOTTOM).
const char *char_stringCharacter string.
Pint *err_indError indicator.
Prect *rectExtent rectangle.
Ppoint *offsetConcatenation offset.
FORTRAN
PQTXX
(wktype, font, chxp,
chsp, chh, txp,
txalh, txalv,
str, errind, txexrx,
txexry, copx, copy) |
integer wktypeWorkstation type.
integer fontText font.
real chxpCharacter expansion factor.
real chspCharacter spacing.
real chhCharacter height.
integer txpText path
(0=PRIGHT, 1=PLEFT, 2=PUP,
3=PDOWN).
integer txalhHorizontal text alignment
(0=PAHNOR, 1=PALEFT,
2=PACENT, 3=PARITE).
integer txalvVertical text alignment
(0=PAVNOR, 1=PATOP, 2=PACAP,
3=PAHALF, 4=PABASE, 5=PABOTT).
character*(*) strCharacter string.
integer errindError indicator.
real txexrx(2)x coordinates of the text extent rectangle.
real txexry(2)y coordinates of the text extent rectangle.
real copxx coordinate of the concatenation offset.
real copyy coordinate of the concatenation offset.
FORTRAN Subset
PQTXXS
(wktype, font, chxp,
chsp, chh, txp,
txalh, txalv, lstr,
str, errind, txexrx,
txexry, copx, copy) |
integer wktypeWorkstation type.
integer fontText font.
real chxpCharacter expansion factor.
real chspCharacter spacing.
real chhCharacter height.
integer txpText path
(0=PRIGHT, 1=PLEFT, 2=PUP,
3=PDOWN).
integer txalhHorizontal text alignment
(0=PAHNOR,
1=PALEFT, 2=PACENT, 3=PARITE).
integer txalvVertical text alignment
(0=PAVNOR, 1=PATOP,
2=PACAP, 3=PAHALF, 4=PABASE, 5=PABOTT).
integer lstrLength of string (in characters).
character*80 strCharacter string.
integer errindError indicator.
real txexrx(2)x coordinates of the text extent rectangle.
real txexry(2)y coordinates of the text extent rectangle.
real copxx coordinate of the concatenation offset.
real copyy coordinate of the concatenation offset.
Errors
None
Related Subroutines
None
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]