SET PATTERN REPRESENTATION PLUS(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET PATTERN REPRESENTATION PLUS − set an extended pattern attribute bundle on a workstation
SYNOPSIS
C Syntax
void
pset_pat_rep_plus ( ws, index, rep )
Pintws;workstation identifier
Pintindex;pattern bundle index
Ppat_rep_plus∗rep; pattern representation pointer
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET PATTERN REPRESENTATION PLUS sets an extended pattern attribute bundle on a workstation.
C Input Parameters
wsThe identifier of the workstation.
indexThis is an index to the workstation pattern bundle table.
repA pointer to a Ppat_rep_plus structure. Ppat_rep_plus is defined as:
typedef struct {
Pint_sizedims;/∗ pattern’s dimensions ∗/
Pinttype;/∗ colour model ∗/
Pcoval∗colr_array;/∗ array of colours ∗/
} Ppat_rep_plus;
Pint_size is defined as:
typedef struct {
Pintsize_x;/∗ dimension (number of divisions) along X ∗/
Pintsize_y;/∗ dimension (number of divisions) along Y ∗/
} Pint_size;
Pcoval is defined as:
typedef union {
Pintind;/∗ index in workstation colour bundle table ∗/
Pcolr_repdirect;/∗ direct colour components ∗/
}Pcoval;
Pcolr_rep is defined as:
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
In the pattern table of the workstation state list, the given index is associated with the specified parameters.
A grid of DX by DY cells is specified with DX being horizontal and DY being vertical. If the colour type is indirect colour, then colour is given individually for each cell by the colour index, which is an index into the colour table of the workstation. Otherwise, the colour is given individually for each cell by a direct colour value in the specified colour model.
If the workstation supports interior style PATTERN, the pattern table in the workstation state list has predefined entries taken from the workstation description table. A number of these entries are predefined for every workstation of category OUTPUT and OUTIN supporting interior style PATTERN. Any table entry, including the predefined entries, may be redefined with this function.
When area-defining primitives are displayed during structure traversal, if the currently selected interior style is PATTERN, the current or back interior style index in the PHIGS state list refers to an entry in the extended pattern table. The selection is made either via the interior bundle or individually, depending on the corresponding Aspect Source Flags(ASFs). If the current or back interior style index is not present in the extended pattern table, then interior style index one is used. If interior style index one is not present, the result is workstation dependent and the interior style PATTERN is not supported for this workstation. The setting of the corresponding ASFs determines which aspects in the entry are used.
During structure traversal, if the colour type of a specified pattern table entry is indirect colour and if a pattern colour index specified in the pattern colour array is not available on the workstation, then colour index one is used.
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, OUTIN, nor MO)
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
112Ignoring function, the pattern index value is less than one
113Ignoring function, the colour index value is less than zero
116Ignoring function, one of the dimensions of the pattern colour array is less than one
136Ignoring function, one of the components of the colour specification is out of range
SEE ALSO
SET INDIVIDUAL ASF (3P)
INQUIRE LIST OF PATTERN INDICES (3)
INQUIRE PATTERN FACILITIES (3P)
INQUIRE PATTERN REPRESENTATION PLUS (3P+)
INQUIRE PREDEFINED PATTERN REPRESENTATION PLUS (3P+)
SET PATTERN REPRESENTATION (3P)
September 02, 1992