Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pqtxx(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE TEXT EXTENT(3P)  —  SUNPHIGS LIBRARY

NAME

INQUIRE TEXT EXTENT − determine the extent rectangle for a text string

SYNOPSIS

C Syntax

void
pinqtextextent ( ws_type, ft, exp, sp, ht, path, hor, ver, str, error_ind, rect, offset )
Pwstypews_type;workstation type
Pintft;text font
Pfloatexp;char expansion factor
Pfloatsp;char spacing
Pfloatht;char height
Ptxpathpath;text path
Ptxhorhor;horizontal alignment
Ptxverver;vertical alignment
Pchar∗str;text string
Pint∗error_ind;OUT error indicator
Prect∗rect;OUT extent rectangle
Ppoint∗offset;OUT concatenation offset

FORTRAN Syntax

SUBROUTINE pqtxx ( WKTYPE, FONT, CHXP, CHSP, CHH, TXP, TXALH, TXALV, STR, ERRIND,
    TXEXRX, TXEXRY, COPX, COPY )
INTEGERWKTYPEworkstation type
INTEGERFONTtext font
REALCHXPcharacter expansion factor
REALCHSPcharacter spacing
REALCHHcharacter height
INTEGERTXPtext path
INTEGERTXALHtext alignment horizontal
INTEGERTXALVtext alignment vertical
CHARACTER∗(∗)STR character string
INTEGERERRINDOUT error indicator
REALTXEXRX(2),TXEXRY(2) OUT text extent rectangle
REALCOPX,COPY OUT concatenation offset

FORTRAN Subset Syntax

SUBROUTINE pqtxxs(WKTYPE, FONT, CHXP, CHSP, CHH, TXP, TXALH, TXALV, LSTR, STR,
    ERRIND, TXEXRX, TXEXRY, COPX, COPY)
INTEGERWKTYPEworkstation type
INTEGERFONTtext font
REALCHXPcharacter expansion factor
REALCHSPcharacter spacing
REALCHHcharacter height
INTEGERTXPtext path
INTEGERTXALHtext alignment horizontal
INTEGERTXALVtext alignment vertical
INTEGERLSTRlength of string (in characters)
CHARACTER∗80STR character string
INTEGERERRINDOUT error indicator
REALTXEXRX(2), TXEXRY(2) OUT text extent rectangle
REALCOPX, COPYOUT concatenation offset

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE TEXT EXTENT calculates the extent (bounding rectangle) and concatenation offset for a specified text string and set of PHIGS text attributes. 

C Input Parameters

ws_type
The workstation type to use to resolve the font.

ftThe font number.  See SET TEXT FONT for the available fonts. 

expThe character expansion factor.  See SET CHARACTER EXPANSION FACTOR for the valid values. 

spThe character spacing.  See SET CHARACTER SPACING for the valid values. 

htThe character height.  See SET CHARACTER HEIGHT for the valid values. 

pathThe text path.  See SET TEXT PATH for the valid values. 

horThe horizontal alignment.  See SET TEXT ALIGNMENT for the valid values. 

verThe vertical alignment.  See SET TEXT ALIGNMENT for the valid values. 

strA pointer to the text string. 

error_ind
The error indicator.  See the Execution section below for a description of its use.  See the Errors section below for the possible values it may return. 

rectA pointer to a Prect structure in which to return the text extent.  See the Execution section below for its meaning.  Prect is defined in phigs.h as:

typedef struct {
Ppointll;/∗ lower left ∗/
Ppointur;/∗ upper right ∗/
} Prect;

Ppoint is defined in phigs.h as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

offsetA pointer to a Ppoint structure in which to return the concatenation offset.  See the Execution section below for its meaning. 

FORTRAN Input Parameters

WKTYPE
The workstation type to use to resolve the font.

FONTThe font number.  See SET TEXT FONT for the available fonts. 

CHXPThe character expansion factor.  See SET CHARACTER EXPANSION FACTOR for the valid values. 

CHSPThe character spacing.  See SET CHARACTER SPACING for the valid values. 

CHHThe character height.  See SET CHARACTER HEIGHT for the valid values. 

TXPThe text path.  See SET TEXT PATH for the valid values. 

TXALH
The horizontal alignment.  See SET TEXT ALIGNMENT for the valid values. 

TXALV
The vertical alignment.  See SET TEXT ALIGNMENT for the valid values. 

STRThe text string. 

ERRIND
The error indicator.  See the Execution section below for a description of its use.  See the Errors section below for the possible values it may return. 

TXEXRX, TXEXRY
The text extent.  See the Execution section below for its meaning. 

TXERX(1) is the lower left x coordinate. 

TXERY(1) is the lower left y coordinate. 

TXERX(2) is the upper right x coordinate. 

TXERY(2) is the upper right y coordinate. 

COPX, COPY
The concatenation offset.  See the Execution section below for its meaning. 

Execution

The extent of the specified character string in the local 2D text coordinate system is computed using the specified text attributes for the specified workstation type.  STROKE precision is assumed.  The text position is (0,0) in the text local coordinate system.  See TEXT 3 for a descripiton of the text local coordinate system and how it is defined.  The text extent encloses the entire text string with the specified attributes applied. 

The concatenation offset 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, an adjustment to account for the intercharacter spacing of the last character as specified by the character spacing parameter.  It will be necessary for the application to apply a suitable modelling transformation to account for the CHARACTER UP VECTOR if it is other than the default. 

If an error is detected by this function the error indicator will indicate the error number of the error detected and no other output data will be returned.  If no error is detected, the error indicator will be set to zero and the inquired information will be available in the output parameters.  Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function. 

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

051Ignoring function, this information is not yet available for this generic workstation type; open a workstation of this type and use the specific workstation type

052Ignoring function, workstation type not recognized by the implementation

062Ignoring function, this information is not available for this MO workstation type

106Ignoring function, the specified font is not available for the requested text precision on the specified workstation

SEE ALSO

TEXT (3P)
ANNOTATION TEXT RELATIVE (3P)
ESCAPE -9 (3P)

Sun Release 4.0  —  Last change: 5 July 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026