[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

INQUIRE COLOR REPRESENTATION (PHOP,WSOP,*,*)

Purpose

Use Inquire Color Representation to inquire the current color values in the specified workstation's color table. The color specification parameters are the coordinates of the color in the current color model at the workstation.

If the type of returned values is REALIZED and your application has neither predefined nor set the color associated with the color index, or the color index is greater than the range of the color table at the workstation, then the graPHIGS API sets the output color parameters to the color associated with color index 1.

If the type of returned values is SET and your application has predefined or set the color associated with the color index, then the graPHIGS API sets the output color parameters as closely as possible to the color associated with the color index as it was predefined or set. This may be the same as the case when the type of returned value is REALIZED.

If the information is available, then the graPHIGS API sets the error indicator to zero and returns the values in the output parameters. If the information is unavailable, then the values returned in the output parameters are unpredictable and the graPHIGS API sets the error indicator to one of the following errors:

3
Function Requires State (PHOP,WSOP,*,*)
54
Specified Workstation Is Not Open
59
Specified Workstation Does Not Have Output Capability
113
Color Index Value < ZERO
101
Specified Representation Has Not Been Defined
Use Inquire Workstation State Table Lengths subroutine to determine the actual size of the workstation's color table.

Language Bindings

C

pinq_colr_rep (ws_id, colr_ind, type, err_ind, colr_rep)

Input Parameters

Pint ws_id
Workstation identifier.

Pint colr_ind
Color index (>=0).

Pinq_type type
Type of returned values (0=PINQ_SET, 1=PINQ_REALIZED).

Output Parameters

Pint *err_ind
Error indicator.

Pcolr_rep *colr_rep
Color representation.

FORTRAN

PQCR (wkid, coli, ccsbsz, type, errind, ol, cspec)

Input Parameters

integer wkid
Workstation identifier.

integer coli
Color index (>=0).

integer ccsbsz
Color component specification buffer size.

integer type
Type of returned values (0=PSET, 1=PREALI).

Output Parameters

integer errind
Error indicator.

integer ol
Number of color components in the color specification.

real cspec(ccsbsz)
Color specification.

Errors

None

Related Subroutines

  • Set Color Representation


  • [ Previous | Next | Contents | Glossary | Home | Search ]