pinq_colr_rep(3g) — Subroutines
Name
pinq_colr_rep − Returns color values.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pinq_colr_rep (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint index, /∗ (I) Color index ∗/
Pinq_type return_type, /∗ (I) Type of the returned values ∗/
Pint ∗error_ind, /∗ (O) Error indicator ∗/
Pcolr_rep ∗rep /∗ (O) Color representation ∗/
)
Data Structures
typedef enum {
PINQ_SET, /∗ Use the exact state list values. ∗/
PINQ_REALIZED /∗ Use the values approximated by the graphics
handler. ∗/
} Pinq_type;
typedef union {
Prgb rgb; /∗ Red, green, and blue color specification ∗/
Pcieluv cieluv; /∗ CIELUV color specification ∗/
Phls hls; /∗ Hue, lightness, and saturation color
specification ∗/
Phsv hsv; /∗ Hue, saturation, and value color
specification ∗/
Pdata unsupp; /∗ color in an unsupported color model ∗/
int impl_dep; /∗ implementation-defined ∗/
} Pcolr_rep;
typedef struct {
Pfloat red; /∗ red intensity ∗/
Pfloat green; /∗ green intensity ∗/
Pfloat blue; /∗ blue intensity ∗/
} Prgb;
typedef struct {
Pfloat cieluv_x; /∗ x coefficient ∗/
Pfloat cieluv_y; /∗ y coefficient ∗/
Pfloat cieluv_y_lum; /∗ y luminance ∗/
} Pcieluv;
typedef struct {
Pfloat hue; /∗ hue ∗/
Pfloat lightness; /∗ lightness ∗/
Pfloat satur; /∗ saturation ∗/
} Phls;
typedef struct {
Pfloat hue; /∗ hue ∗/
Pfloat satur; /∗ saturation ∗/
Pfloat value; /∗ value ∗/
} Phsv;
typedef struct {
size_t size; /∗ size of data ∗/
void ∗data; /∗ pointer to the data ∗/
} Pdata;
Description
pinq_colr_rep queries the workstation state list and returns the color values. If the color model uses a triplet, the values are the color coordinates of the color in the current color model on the workstation. (See the pset_colr_model and pset_colr_rep functions.) The returned values are affected by the specified type of returned values, as follows:
•When the specified type of returned values is PINQ_SET, the function sets the values it returns to the color triplet as closely as possible to the color associated with the specified color index predefined by Digital PHIGS or set by this function. In some cases, PINQ_SET will cause the function to return the same values when you specify PINQ_REALIZED.
•When the specified type of returned values is PINQ_REALIZED, the function sets the values it returns to the color triplet to the colors associated with color index 1, if one of the following conditions exists:
•The color associated with the specified color index was not predefined or set.
•The specified color index is greater than the range of the workstation color table.
See Also
pinq_colr_facs
pinq_colr_model
pinq_colr_rep
pset_colr_rep