INQUIRE PATTERN REPRESENTATION(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
INQUIRE PATTERN REPRESENTATION − inquire a pattern representation on a workstation
SYNOPSIS
C Syntax
void
pinq_pat_rep ( ws, index, type, store, error_ind, rep, )
Pintws;workstation identifier
Pintindex;pattern index
Pinq_typetype;type of returned value
Pstorestore;handle to Store object
Pint∗error_ind;OUT error indicator
Ppat_rep∗∗rep;OUT pattern representation
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE PATTERN REPRESENTATION to determine the pattern representation on a specified workstation for a given pattern index.
C Input Parameters
Applications using the C binding must create a buffer to be used by this function as memory space for storing data associated with the device state. This buffer is passed as the store argument.
The store buffer is a data area managed by PHIGS. While the application is responsible for creating the inital buffer through a call to CREATE STORE, PHIGS manages this area such that there is sufficient memory for the specific inquiry. The data record within the store buffer is accessed by the pointer pointed to by rep.
ws
Workstation identifier.
index
Entry to be returned from the workstation’s table of pattern representations; if this entry is not present in the table and the type of returned value parameter is REALIZED, the representation for pattern index 1 is returned.
type
An enumerated value specifying whether the inquired values are to be returned as the values originally specified by the application (SET), or as the values actually being used by the workstation if any of the application-specified values had to be mapped to ones available on the workstation (REALIZED). Valid values are defined in phigs.h as:
PINQ_SETreturn application-specified value
PINQ_REALIZEDreturn value available on the workstation
store
The memory buffer PHIGS is to use for storing the information returned. This buffer must exist prior to calling this function (see CREATE STORE (3P)).
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
repA pointer to a pointer to a Ppat_rep structure in which the system returns the pattern representation at index in the workstation table of pattern representations. Ppat_rep is defined in phigs.h as follows:
typedef struct {
Pint_sizedims;/∗ pattern’s dimensions ∗/
Pint∗colr_array;/∗ colour index array ∗
} Ppat_rep;
The Pint_size structure used to define the pattern dimensions is defined in phigs.h as follows:
typedef struct {
Pintsize_x;/∗ dimension (number of divisions) along X ∗/
Pintsize_y;/∗ dimension (number of divisions) along Y ∗/
} Pint_size;
The colr_array component is a pointer to an array of the colour indices defining the pattern, of the dimensions defined by the dims component.
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)
112Ignoring function, the pattern index value is less than one
101Ignoring function, the specified representation has not been defined
109Ignoring function, interior style PATTERN is not supported on the workstation
SEE ALSO
INQUIRE LIST OF PATTERN INDICES (3P)
SET PATTERN REPRESENTATION (3P)
INQUIRE PREDEFINED PATTERN REPRESENTATION (3P)
INQUIRE PATTERN REPRESENTATION PLUS (3P+)
CREATE STORE (3P)
DELETE STORE (3P)
September 02, 1992