Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pstxr(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET TEXT REPRESENTATION(3P)  —  SUNPHIGS LIBRARY

NAME

SET TEXT REPRESENTATION − define a text attribute bundle on a workstation

SYNOPSIS

C Syntax

void
psettextrep ( ws, index, rep )
Pintws;workstation identifier
Pintindex;text bundle index
Ptxbundl∗rep;text representation pointer

FORTRAN Syntax

SUBROUTINE pstxr ( WKID, TXI, FONT, PREC, CHXP, CHSP, COLI )
INTEGERWKIDworkstation identifier
INTEGERTXItext index
INTEGERFONTtext font
INTEGERPRECtext precision (PSTRP, PCHARP, PSTRKP)
REALCHXPcharacter expansion factor
REALCHSPcharacter spacing
INTEGERCOLIcolour index

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET TEXT REPRESENTATION defines a bundle of text attributes for a specified entry in the workstation’s text bundle table.  Depending on the ASF for each of the text attributes, the bundled attributes may apply to the following primitives:

TEXT
TEXT 3
ANNOTATION TEXT RELATIVE
ANNOTATION TEXT RELATIVE 3

C Input Parameters

wsThe identifier of the workstation for which the text representation is being defined. 

indexThe text index of the entry being defined. 

repA pointer to a structure containing the attribute values defining the text representation, defined as follows:

typedef struct {
Pintfont;/∗ text font ∗/
Ptxprecprecision;/∗ text precision ∗/
Pfloatexp;/∗ character expansion factor ∗/
Pfloatspace;/∗ character spacing ∗/
Pintcolour;/∗ colour index ∗/
} Ptxbundl;

rep->font is a text font index, possibly workstation-dependent. 

rep->precision is a text precision enumeration value, one of:

Text PrecisionMeaning
PPSTRING“String Precision”
PPCHAR“Character Precision”
PPSTROKE“Stroke Precision”

rep->exp is the character expansion factor value. 

rep->space is the character spacing factor value. 

rep->colour is the text colour index, which selects a colour value from the workstation’s colour table. 

FORTRAN Input Parameters

WKIDThe identifier of the workstation for which the text representation is being defined. 

TXIThe text index of the entry being defined. 

FONTThe text font index, possibly workstation-dependent. 

PRECThe text precision enumeration value, one of:

Text PrecisionMeaning
PSTRP“String Precision”
PCHARP“Character Precision”
PSTRKP“Stroke Precision”

CHXPThe character expansion factor value. 

CHSPThe character spacing factor value. 

COLIThe text colour index, which selects a colour value from the workstation’s colour table. 

Execution

When SET TEXT REPRESENTATION is called, the text index entry in the table of defined text representations on the workstation is set to the text font index, text precision, character expansion factor, character spacing factor, and text colour index values. 

When text output primitives are displayed, the text representation specified by the ‘current text index’ entry in the PHIGS traversal state list provides the text attributes for which the Aspect Source Flag (ASF) is BUNDLED.  For example, when the ‘current text font ASF’ is set to BUNDLED, the “effective” text font is the text font attribute in the text representation selected by the ‘current text index’.  The ‘current text index’ is set by SET TEXT INDEX structure elements. 

The text precision specifies the level of precision used to draw the text characters in relation to the font definition and applicable text attributes. 

The character expansion factor is used to scale the standard width of the characters established by the width-to-height ratio specified by the font design. An expansion factor of less than one produces narrower characters; an expansion factor of greater than one produces wider characters, relative to their height. 

The character spacing factor is specified as a fraction of the current character height. A positive value inserts additional space between adjacent character bodies in the text string; a negative value causes the adjacent character bodies to overlap. The default value is 0.0, so the character bodies are placed adjacent to one another with no additional space beyond that already in the font’s design. 

The text bundle table is numbered from 1. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

059Ignoring function, the specified workstation does not have output capability (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)

100Ignoring function, the bundle index value is less than one

103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table

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

113Ignoring function, the colour index value is less than zero

SEE ALSO

SET TEXT INDEX (3P)
SET INDIVIDUAL ASF (3P)
INQUIRE TEXT REPRESENTATION (3P)
SET TEXT FONT (3P)
SET TEXT PRECISION (3P)
SET CHARACTER EXPANSION FACTOR (3P)
SET CHARACTER SPACING (3P)
SET CHARACTER COLOUR INDEX (3P)
SET EXTENDED TEXT REPRESENTATION (3P+)

Sun Release 4.0  —  Last change: 13 July 1989

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