Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psetextpatrep(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET EXTENDED PATTERN REPRESENTATION(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

SET EXTENDED PATTERN REPRESENTATION − set an extended pattern attribute bundle on a workstation

SYNOPSIS

C Syntax

void
psetextpatrep ( wsid, index, rep )
Pintwsid;workstation identifier
Pintindex;pattern index number
Pextptbundl∗rep;pointer to extended pattern representation

FORTRAN Syntax

SUBROUTINE psepr ( WKID, INDEX, PROWS, PCOLS, COLMOD, IPCOLR, PCOLR )
INTEGERWKIDworkstation identifier
INTEGERINDEXpattern bundle index
INTEGERPROWSpattern dimensions along y-axis
INTEGERPCOLSpattern dimensions along x-axis
INTEGERCOLMODcolour model
INTEGERIPCOLRindirect colour index
REALPCOLR(3)direct colour value

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET EXTENDED PATTERN REPRESENTATION sets an extended pattern attribute bundle on a workstation. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

wsidThe identifier of the workstation. 

indexThis is an index to the workstation pattern bundle table. 

repA pointer to a Pextptbundl structure. Pextptbundl is defined as:

typedef struct {
Pdimdim;/∗ pattern’s dimensions ∗/
Pinttype;/∗ colour model ∗/
Pcoval∗array;/∗ array of colours ∗/
} Pextptbundl;

Pdim is defined as:

typedef struct {
Pintx_dim;/∗ dimension (number of divisions) along x ∗/
Pinty_dim;/∗ dimension (number of divisions) along y ∗/
} Pdim;

Pcoval is defined as:

typedef union {
Pintindex;/∗ index in workstation colour bundle table ∗/
Pcobundldirect;/∗ direct colour components ∗/
}Pcoval;

Pcobundl is defined as:

typedef struct {
Pfloatx;/∗ red, hue, etc ∗/
Pfloaty;/∗ green, saturation, lightness, etc ∗/
Pfloatz;/∗ blue, value, saturation, etc ∗/
} Pcobundl;

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h. 

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

INDEX
The index into the specified workstation pattern bundle table.

PROWS
The pattern dimensions along the y axis. 

PCOLS
The pattern dimensions along the x axis. 

COLMOD
The colour model.  The predefined values are:

0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

IPCOLR
An integer index into the workstation colour table for determining pattern colour. This value is only used if COLMOD is equal to PINDIR. 

PCOLR(3)
An array of reals containing the pattern colour. This array is unused if COLMOD is equal to PINDIR. 

PCOLR(1) = Red, Hue, etc.
PCOLR(2) = Green, Saturation, Lightness, etc.
PCOLR(3) = Blue, Value, Saturation, etc.

Execution

In the pattern table of the workstation state list, the given index is associated with the specified parameters. 

A grid of DX by  DY cells is specified with DX being horizontal and DY being vertical. If the colour type is indirect colour, then colour is given individually for each cell by the colour index, which is a pointer into the colour table of the workstation. Otherwise, the colour is given individually for each cell by a direct colour value in the specified colour model. 

If the workstation supports interior style PATTERN, the pattern 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 and OUTIN supporting interior style PATTERN. Any table entry, including the predefined entries, may be redefined with this function. 

When area defining primitives are displayed during structure traversal, if the currently selected interior style is PATTERN, the current, or back, interior style index in the PHIGS state list refers to an entry in the extended pattern table. The selection is made either via the interior bundle or individually, depending on the corresponding Aspect Source Flags(ASFs). If the current, or back, interior style index is not present in the extended pattern table, then interior style index one is used. If interior style index one is not present, the result is workstation dependent and the interior style PATTERN is not supported for this workstation.  The setting of the corresponding ASFs determines which aspects in the entry are used. 

During structure traversal, if the colour type of a specified pattern table entry is indirect colour and if a pattern colour index specified in the pattern colour array is not available on the workstation, then colour index one is 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 (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)

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

110Ignoring function, the specified colour model is not available on the workstation

112Ignoring function, the pattern index value is less than one

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

116Ignoring function, one of the dimensions of the pattern colour array is less than one

SEE ALSO

SET INDIVIDUAL ASF (3P)
INQUIRE EXTENDED PATTERN REPRESENTATION (3P+)
INQUIRE PREDEFINED EXTENDED PATTERN REPRESENTATION (3P+)
SET PATTERN REPRESENTATION (3P)

Sun Release 4.0  —  Last change: 13 July 1989

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