Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE COLOUR REPRESENTATION(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

INQUIRE COLOUR REPRESENTATION − inquire a colour representation on a workstation

SYNOPSIS

C Syntax

void
pinq_colr_rep ( ws, index, type, error_ind, rep )
Pintws;workstation identifier
Pintindex;colour index
Pinq_typetype;type of returned value
Pint∗error_ind;OUT error indicator
Pcolr_rep∗rep;OUT colour representation

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

PINQ_SETReturn the values exactly as they are specified in the application program. 

PINQ_REALIZED Return 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. Pcolr_rep is defined in phigs.h as follows:

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;

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)

September 02, 1992

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