INQUIRE PREDEFINED COLOUR REPRESENTATION(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
INQUIRE PREDEFINED COLOUR REPRESENTATION − inquire a predefined colour representation for a workstation type
SYNOPSIS
C Syntax
void
pinq_pred_colr_rep ( type, index, error_ind, bundle )
Pinttype;workstation type
Pintindex;predefined index
Pint∗error_ind;OUT error indicator
Pcolr_rep∗bundle;OUT predefined colour rep
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE PREDEFINED COLOUR REPRESENTATION to determine the predefined colour representation for a specified workstation type at a given colour index.
C Input Parameters
type
Type of workstation.
index
Entry in the workstation table of predefined colour representations to be returned.
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
bundleA pointer to a Pcolr_rep structure in which the system returns the colour representation at index on the workstation table of predefined colour representations. Pcolr_rep is defined in phigs.h as:
typedef union {
Prgbrgb;/∗ Red Green Blue colour specification ∗/
Pcieluvcieluv;/∗ CIE L∗U∗V∗ colour specification ∗/
Phlshls;/∗ Hue Lightness Saturation colour specification ∗/
Phsvhsv;/∗ Hue Saturation Value colour specification ∗/
Pdataunsupp;/∗ Colour in unsupported colour model ∗/
} Pcolr_rep;
Prgb is defined in phigs.h as follows:
typedef struct {
Pfloatred;/∗ red, hue, etc ∗/
Pfloatgreen;/∗ green, saturation, lightness, etc ∗/
Pfloatblue;/∗ blue, value, saturation, etc ∗/
} Prgb;
Pcieluv is defined in phigs.h as follows:
typedef struct {
Pfloatcieluv_x;/∗ x coefficient ∗/
Pfloatcieluv_y;/∗ y coefficient ∗/
Pfloatcieluv_y_lum; /∗ y luminance ∗/
} Pcieluv;
Phsv is defined in phigs.h as follows:
typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatsatur;/∗ saturation ∗/
Pfloatvalue;/∗ value ∗/
} Phsv;
Phls is defined in phigs.h as follows:
typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatlightness;/∗ lightness ∗/
Pfloatsatur;/∗ saturation ∗/
} Phls;
Pdata is defined in phigs.h as follows:
typedef struct {
size_tsize;/∗ size of data ∗/
char∗data/∗pointer to data ∗/
} Pdata;
Execution
If the inquired information is available, the error indicator is returned as zero and values are returned in the output parameters.
If the inquired information is not available, the values returned in the output parameters are undefined and the error indicator is set to one of the below error numbers to indicate the reason for nonavailability.
Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
051Ignoring function, this information is not yet available for this workstation type; open a workstation of this type and use the specific workstation type
052Ignoring function, workstation type not recognized by the implementation
059Ignoring function, the specified workstation does not have output capability (in other words, the workstation category is neither OUTPUT, OUTIN, nor MO)
062Ignoring function, this information is not available for this MO workstation type
113Ignoring function, the colour index value is less than zero
102Ignoring function, the specified representation has not been predefined on this workstation
SEE ALSO
INQUIRE COLOUR FACILITIES (3P)
SET COLOUR REPRESENTATION (3P)
INQUIRE COLOUR REPRESENTATION (3P)
INQUIRE LIST OF COLOUR INDICES (3P)
September 02, 1992