SET TEXT REPRESENTATION PLUS(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET TEXT REPRESENTATION PLUS − use to define an extended text attribute representation bundle on a workstation
SYNOPSIS
C Syntax
void
pset_text_rep_plus ( ws, index, rep )
Pintws;workstation identifier
Pintindex;text bundle index
Ptext_bundle_plus∗rep; text representation pointer
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET TEXT REPRESENTATION PLUS defines an extended text attribute representation bundle on a workstation. 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.
indexThis is an index to the workstation text bundle table.
repA pointer to a Ptext_bundle_plus structure. Ptext_bundle_plus is defined as:
typedef struct {
Pintfont;/∗ text font ∗/
Ptext_precprec;/∗ text precision ∗/
Pfloatchar_expan;/∗ character expansion factor ∗/
Pfloatchar_space;/∗ character spacing ∗/
Pgcolrcolr_ind;/∗ text colour ∗/
} Ptext_bundle_plus;
Ptext_prec is defined as:
typedef enum {
PPREC_STRING,
PPREC_CHAR,
PPREC_STROKE
} Ptext_prec;
Pgcolr is defined as:
typedef struct {
Pinttype;/∗ indirect, RGB, CIE, HSV, HLS ∗/
union {
Pintind;/∗ index in workstation colour bundle table ∗/
struct {
Pfloatx;/∗ red, hue, etc. ∗/
Pfloaty;/∗ green, saturation, lightness, etc. ∗/
Pfloatz;/∗ blue, value, saturation, etc. ∗/
} general;
} val;
} Pgcolr;
Execution
In the text bundle table of the workstation state list, the given index is associated with the specified parameters.
The text precision value determines the fidelity with which the other aspects are used. The values of text precision, in order of increasing fidelity, are STRING, CHAR, and STROKE. During structure traversal, if the specified text precision is not available on a workstation, the value STRING is used on that workstation.
The character expansion factor specifies the deviation of the width to height ratio of the characters from the ratio indicated by the font designer. During structure traversal, only the magnitude of the character expansion factor is considered. If the result of taking the absolute value of the character expansion factor value is less than the smallest supported character expansion factor on a workstation, the smallest supported character expansion factor on that workstation is used.
Character spacing specifies how much additional space is inserted between two adjacent character bodies. Character spacing is specified as a fraction of the font-nominal character height.
Text colour is a general colour, either an indirect or a direct colour in a specified colour model. If an indirect colour is specified and the specified colour index is not available during structure traversal, then colour index one is used.
The extended text bundle table in the workstation state list has predefined entries taken from the workstation description table. A number of these entries are predefined for every workstation of category OUTPUT or OUTIN. Any table entry, including the predefined entries, may be redefined with this function.
When either text, or annotation text, is displayed during structure traversal, the current text index in the PHIGS traversal state list refers to an entry in the extended text bundle table. If the current text index is not present in the extended text bundle table, then text index one is used. The setting of the corresponding Aspect Source Flags(ASFs) determines which aspects in the entry are used.
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 (that is, 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
110Ignoring function, the specified colour model is not available on the workstation
113Ignoring function, the colour index value is less than zero
136Ignoring function, one of the components of the color specification is out of range
SEE ALSO
SET INDIVIDUAL ASF (3P)
INQUIRE TEXT REPRESENTATION PLUS (3P+)
SET TEXT REPRESENTATION (3P)
SET TEXT INDEX (3P)
SET TEXT FONT (3P)
SET TEXT PRECISION (3P)
SET CHARACTER EXPANSION FACTOR (3P)
SET CHARACTER SPACING (3P)
SET TEXT COLOUR (3P+)
SET TEXT COLOUR INDEX (3P)
INQUIRE TEXT REPRESENTATION (3P)
September 02, 1992