INQUIRE PATTERN REPRESENTATION(3P) — SUNPHIGS LIBRARY
NAME
INQUIRE PATTERN REPRESENTATION − inquire a pattern representation on a workstation
SYNOPSIS
C Syntax
void
pinqpatrep ( ws, index, type, size, error_ind, buffer, rep, total_size )
Pintws;workstation identifier
Pintindex;pattern index
Pinqtypetype;type of returned value
Pintsize;size of application buffer
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Pptbundl∗rep;OUT pattern representation
Pint∗total_size;OUT actual size of buffer
FORTRAN Syntax
SUBROUTINE pqpar ( WKID, PAI, TYPE, DIMX, DIMY, ERRIND, DX, DY, COLIA )
INTEGERWKIDworkstation identifier
INTEGERPAIpattern index
INTEGERTYPEtype of returned values (PSET, PREALI)
INTEGERDIMX, DIMYmaximum pattern array dimensions
INTEGERERRINDOUT error indicator
INTEGERDX, DYOUT pattern array dimensions
INTEGERCOLIA(DIMX, DIMY) OUT pattern array
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
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:
PSETReturn Application-specified Value
PREALIZEDReturn Value Available on the Workstation
size
Size, in number of bytes, of the application supplied buffer in which the requested pattern representation will be stored.
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
bufferA pointer to the buffer (of size bytes) in which the requested pattern representation is to be returned. Note: The buffer is for use by the system. The system assigns the rep−>array pointer to the memory space pointed to by buffer. The application accesses the returned information through the rep parameter. If the buffer allocated is not large enough to hold all of the requested pattern representation, none of the information is returned, but total_size is returned with the number of bytes needed. If you call INQUIRE PATTERN REPRESENTATION with a buffer size of 0, total size is returned with the size of the buffer that you will need to allocate. Error 2200 is returned if the buffer size is too small, but not if it is zero.
repA pointer to a Pptbundl structure in which the system returns the pattern representation at index in the workstation table of pattern representations. Pptbundl is defined in phigs.h as follows:
typedef struct {
Pdimdim;/∗ pattern’s dimensions ∗/
Pint∗array;/∗ colour index array ∗
} Pptbundl;
The Pdim structure used to define the pattern dimensions is defined in phigs.h as follows:
typedef struct {
Pintx_dim;/∗ dimension (number of divisions) along X ∗/
Pinty_dim;/∗ dimension (number of divisions) along Y ∗/
} Pdim;
The array component is a pointer to an array of the colour indices defining the pattern, of the dimensions defined by the dim component.
total_size
A pointer which returns the actual size of the buffer needed to return all the information requested.
FORTRAN Input Parameters
WKID
Workstation identifier.
PAI
Entry to be returned from the workstation 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 phigs77.h as:
PSETReturn Application-specified Value
PREALIReturn Value Available on the Workstation
DIMX
The x dimension of the COLIA array in which the requested pattern representation is to be returned. If this value is smaller than the actual x dimension of the pattern representation to be returned (DX), no data will be returned in the COLIA array, but DX and DY will be set to indicate the array size required.
DIMY
The y dimension of the COLIA array in which the requested pattern representation is to be returned. If this value is smaller than the actual y dimension of the pattern representation to be returned (DY), no data will be returned in the COLIA array, but DX and DY will be set to indicate the array size required. If you call this function with both dimensions set to zero, DX and DY will be set to indicate the array size required. Error 2001 will be returned if either dimension is too small, but not if both are zero.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
DXThe x dimension of the pattern representation returned in COLIA.
DYThe y dimension of the pattern representation returned in COLIA.
COLIA
An array of integers in which the system returns the pattern representation at PAI in the workstation table of pattern representations.
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 (i.e., 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 EXTENDED PATTERN REPRESENTATION (3P+)
Sun Release 4.0 — Last change: 13 July 1989