Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

SET COLOUR MAPPING REPRESENTATION − define a colour mapping representation entry in the workstation table of defined colour mapping representations

SYNOPSIS

C Syntax

void
pset_colr_map_rep ( ws, index, map_method, map_data )
Pintws;workstation identifier
Pintindex;colour mapping bundle index
Pintmap_method; mapping method
Pcolr_map_data∗map_data; mapping method data record

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

SET COLOUR MAPPING REPRESENTATION defines or sets a colour mapping representation in the specified workstation’s colour mapping table. 

wsThe workstation identifier specifies the workstation for which the colour mapping representation is to be defined. 

indexThe index of the colour mapping representation to set. 

map_method
The colour mapping method. The colour mapping methods are defined in phigs.h as follows:

1PCOLR_MAP_TRUE
2PCOLR_MAP_PSEUDO
3PCOLR_MAP_PSEUDO_N

C Output Parameters

map_data
A pointer to a pointer to a Pcolr_map_data structure that contains the information specific to the data mapping method. Pcolr_map_data is defined in phigs.h as follows:

typedef union {
struct {
Pintcolr_model;
Pfloat_listweights;
Pcolr_rep_list colrs;
} method_r2
struct {
Pintcolr_model;
Pfloat_list_list colr_lists;
} method_r3
} Pcolr_map_data;

Pfloat_list is defined in phigs.h as follows:

typedef struct {
Pintnum_floats;/∗ number of Pfloats in list ∗/
Pfloat∗floats;/∗ list of floats ∗
} Pfloat_list;

Pfloat_list_list is defined in phigs.h as follows:

typedef struct {
Pintnum_lists;/∗ number of lists in list ∗/
Pfloat_list∗lists;/∗ list of float lists ∗/
} Pfloat_list_list;

Pcolr_rep_list is defined in phigs.h as follows:

typedef struct {
Pintnum_colr_reps;/∗ number of colours ∗/
Pcolr_rep∗colr_reps;/∗ array of colours ∗/
} Pcolr_rep_list;

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;

There is no data associated with mapping method PCOLR_MAP_TRUE.  The data for method PCOLR_MAP_PSEUDO is a list of weights and a list of direct colours.  colr_model specifies the type of colours given in the list of colours, colrs.  The colour models are defined in phigs.h as follows:

1PMODEL_RGB
2PMODEL_CIELUV
3PMODEL_HSV
4PMODEL_HLS

The data for mapping method PCOLR_MAP_PSEUDO_N is N lists of direct colours.  These colours may be of the same types as for PCOLR_MAP_PSEUDO. 

Execution

When SET COLOUR MAPPING REPRESENTATION is called, the specified entry in the table of defined colour mapping representations of the specified workstation is set to the values specified. 

During structure traversal, the current colour mapping representation is selected from the workstation table by a structure element created by the SET COLOUR MAPPING INDEX subroutine. 

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 (that is, the workstation category is neither OUTPUT nor OUTIN)

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

110Ignoring function, the specified colour model is not available on the workstation

121Ignoring function, colour mapping index is less than 0. 

125Ignoring function, the total of the colour range fields in all the table entries is too large. 

126Ignoring function, the specified colour mapping method is not available on the specified workstation. 

136Ignoring function, one of the components of the colour specification is out of range

138Ignoring function, one or more of the fields in the specified data record is inconsistent with te specified type. 

SEE ALSO

SET COLOUR MAPPING INDEX (3P+)
INQUIRE COLOUR MAPPING REPRESENTATION (3P+)

September 02, 1992

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