Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

SET COLOUR REPRESENTATION − define a colour representation entry in the workstation’s colour table

SYNOPSIS

C Syntax

void
pset_colr_rep ( ws, index, rep )
Pintws;workstation identifier
Pintindex;colour bundle index
Pcolr_rep∗rep;colour representation pointer

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET COLOUR REPRESENTATION defines an entry in the workstation’s colour table.  Each entry in this table contains three component values, defining a colour in the current colour model.  The colour representations apply to all primitives. 

Note: PEX-SI presently supports only the RGB colour model. 

C Input Parameters

wsThe identifier of the workstation for which the colour representation is being defined. 

indexThe colour index of the entry being defined. 

repA pointer to a union containing the three colour components defining the colour representation.  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;

Phls is defined in phigs.h as follows:

typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatlightness;/∗ lightness ∗/
Pfloatsatur;/∗ saturation ∗/
} Phls;

Phsv is defined in phigs.h as follows:

typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatsatur;/∗ saturation ∗/
Pfloatvalue;/∗ value ∗/
} Phsv;

Pdata is defined in phigs.h as follows:

typedef struct {
size_tsize;/∗ size of data ∗/
char∗data/∗pointer to data ∗/
} Pdata;

Execution

When SET COLOUR REPRESENTATION is called, the colour index entry in the table of defined colour representations on the workstation is set to the three colour components specified. 

For the RGB colour model, the only one implemented in this release, the range for these colour components is 0 to 1: 0 sets the colour component off; 1 sets the colour component at full intensity. 

The colour table is numbered from 0, the background colour, to a workstation-dependent maximum. 

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 (in other words, the workstation category is neither OUTPUT, OUTIN, nor MO)

113Ignoring function, the colour index value is less than zero

103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table

118Ignoring function, one of the components of the colour specification is out of range.  The valid range is dependent upon the current colour model

SEE ALSO

PHIGS WORKSTATION DESCRIPTION TABLE (7P)
WORKSTATION TYPE SET (3P)
SET POLYLINE COLOUR INDEX (3P)
SET POLYMARKER COLOUR INDEX (3P)
SET TEXT COLOUR INDEX (3P)
SET INTERIOR COLOUR INDEX (3P)
SET EDGE COLOUR INDEX (3P)
SET COLOUR MODEL (3P)
INQUIRE COLOUR REPRESENTATION (3P)
INQUIRE PREDEFINED COLOUR REPRESENTATION (3P)

September 02, 1992

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