SET COLOUR REPRESENTATION(3P) — SUNPHIGS LIBRARY
NAME
SET COLOUR REPRESENTATION − define a colour representation entry in the workstation’s colour table.
SYNOPSIS
C Syntax
void
psetcolourrep ( ws, index, rep )
Pintws;workstation identifier
Pintindex;colour bundle index
Pcobundl∗rep;colour representation pointer
FORTRAN Syntax
SUBROUTINE pscr ( WKID, CI, C1, C2, C3 )
INTEGERWKIDworkstation identifier
INTEGERCIcolour index
REALC1, C2, C3colour components
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET COLOUR REPRESENTATION defines an entry in the workstation’s colour table. Each entry in this table contains three component values, defining a colour in the current colour model. The colour representations apply to all primitives.
C Input Parameters
wsThe identifier of the workstation for which the colour representation is being defined.
indexThe colour index of the entry being defined.
repA pointer to a structure containing the three colour components defining the colour representation, defined as follows:
typedef struct {
Pfloatx;/∗ red, hue, etc. colour component ∗/
Pfloaty;/∗ green, saturation, lightness, etc. colour component ∗/
Pfloatz;/∗ blue, value, saturation, etc. colour component ∗/
} Pcobundl;
FORTRAN Input Parameters
WKIDThe identifier of the workstation for which the colour representation is being defined.
CIThe colour index of the entry being defined.
C1The red, hue, etc. colour component of the colour representation.
C2The green, saturation, lightness, etc. colour component of the colour representation.
C3The blue, value, saturation, etc. colour component of the colour representation.
Execution
When SET COLOUR REPRESENTATION is called, the colour index entry in the table of defined colour representations on the workstation is set to the three colour components specified.
For the RGB colour model, the only one implemented in this release, the range for these colour components is 0 to 1: 0 sets the colour component off; 1 sets the colour component at full intensity.
The colour table is numbered from 0, the background colour, to a workstation-dependent maximum.
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)
113Ignoring function, the colour index value is less than zero
103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
118Ignoring function, one of the components of the colour specification is out of range. The valid range is dependent upon the current colour model
SEE ALSO
PHIGS WORKSTATION DESCRIPTION TABLE(7)
WORKSTATION TYPE SET (3P)
SET POLYLINE COLOUR INDEX (3P)
SET POLYMARKER COLOUR INDEX (3P)
SET TEXT COLOUR INDEX (3P)
SET INTERIOR COLOUR INDEX (3P)
SET EDGE COLOUR INDEX (3P)
SET COLOUR MODEL (3P)
INQUIRE COLOUR REPRESENTATION (3P)
INQUIRE PREDEFINED COLOUR REPRESENTATION (3P)
Sun Release 4.0 — Last change: 10 July 1989