INQUIRE COLOUR REPRESENTATION(3P) — SUNPHIGS LIBRARY
NAME
INQUIRE COLOUR REPRESENTATION − inquire a colour representation on a workstation
SYNOPSIS
C Syntax
void
pinqcolourrep ( ws, index, type, error_ind, rep )
Pintws;workstation identifier
Pintindex;colour index
Pinqtypetype;type of returned value
Pint∗error_ind;OUT error indicator
Pcobundl∗rep;OUT colour representation
FORTRAN Syntax
SUBROUTINE pqcr ( WKID, COLI, TYPE, ERRIND, C1, C2, C3 )
INTEGERWKIDworkstation identifier
INTEGERCOLIcolour index
INTEGERTYPEtype of returned values (PSET, PREALI)
INTEGERERRINDOUT error indicator
REALC1, C2, C3OUT colour components
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE COLOUR REPRESENTATION to determine the current representation in a specified colour table entry from a specified workstation’s state list.
C Input Parameters
wsThe workstation identifier of the workstation whose state list is queried.
indexEntry to be returned from the workstation’s colour table; if this entry is not present in the table and the type of returned value parameter is REALIZED, the representation for colour index 1 is returned.
typeAn enumerated variable specifying whether the value desired is the value specified by the application program or the available value used by the workstation. Valid values are:
ValueMeaning
PSETReturn the values exactly as they are specified in the application program.
PREALIZEDReturn the values as they are used by the workstation when the values specified in the application program are mapped to values available on the workstation.
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
repA pointer to a structure in which the system returns the colour representation at entry index. Pcobundl is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ red, hue, etc., colour value ∗/
Pfloaty;/∗ green, saturation, lightness, etc., colour value ∗/
Pfloatz;/∗ blue, value, saturation, etc., colour value ∗/
} Pcobundl;
FORTRAN Input Parameters
WKIDThe workstation identifier of the workstation whose state list is queried.
COLIEntry to be returned from the workstation’s colour table; if this entry is not present in the table and the type of returned value parameter is REALIZED, the representation for colour index 1 is returned.
TYPEAn enumerated variable specifying whether the value desired is the value specified by the application program or the available value used by the workstation. Valid values are:
ValueMeaning
PSETReturn the values exactly as they are specified in the application program.
PREALIReturn the values as they are used by the workstation when the values specified in the application program are mapped to values available on the workstation.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
C1, C2, C3
The three colour components of the colour representation at entry COLI. For the RGB colour model, the three components are red, green, and blue, respectively.
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
101Ignoring function, the specified representation has not been defined
SEE ALSO
INQUIRE COLOUR FACILITIES (3P)
SET COLOUR REPRESENTATION (3P)
INQUIRE PREDEFINED COLOUR REPRESENTATION (3P)
Sun Release 4.0 — Last change: 2 August 1989