INQUIRE PREDEFINED PATTERN REPRESENTATION(3P) — SUNPHIGS LIBRARY
NAME
INQUIRE PREDEFINED PATTERN REPRESENTATION − inquire a predefined pattern representation for a workstation type
SYNOPSIS
C Syntax
void
pinqpredpatrep ( type, index, size, error_ind, buffer, total_size, bundle )
Pwstypetype;workstation type
Pintindex;predefined index
Pintsize;size of buffer
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Pint∗total_size;OUT actual size of buffer
Pptbundl∗bundle;OUT predefined pattern rep
FORTRAN Syntax
SUBROUTINE pqppar ( WTYPE, PPAI, DIMX, DIMY, ERRIND, DX, DY, COLIA )
INTEGERWTYPEworkstation type
INTEGERPPAIpredefined pattern index
INTEGERDIMX, DIMYmaximum pattern array dimensions
INTEGERERRINDOUT error indicator
INTEGERDX, DYOUT pattern array dimensions
INTEGERCOLIA(DIMX, DIMY) OUT pattern array
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE PREDEFINED PATTERN REPRESENTATION to determine the predefined pattern representation for a specified workstation type at a given pattern index.
C Input Parameters
type
Workstation type.
index
Entry to be returned from the workstation table of predefined pattern representations.
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 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 colour index array pointer to the memory space pointed to by buffer. The application accesses the returned information through the bundle 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 PREDEFINED PATTERN REPRESENTATION with a buffer size of zero, 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.
total_size
A pointer which returns the actual size of the buffer needed to return all the information requested.
bundleA pointer to a Pptbundl structure in which the system returns the pattern representation at index in the workstation table of predefined pattern representations. Pptbundl is defined in phigs.h as:
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:
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.
FORTRAN Input Parameters
WTYPE
Workstation type.
PPAI
Entry to be returned from the workstation table of predefined pattern representations.
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 PPAI in the workstation table of pattern representations.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
051Ignoring function, this information is not yet available for this workstation type; open a workstation of this type and use the specific workstation type
052Ignoring function, workstation type not recognized by the implementation
059Ignoring function, the specified workstation does not have output capability (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)
062Ignoring function, this information is not available for this MO workstation type
102Ignoring function, the specified representation has not be predefined on this workstation
112Ignoring function, the pattern index value is less than one
SEE ALSO
INQUIRE PATTERN FACILITIES (3P)
SET PATTERN REPRESENTATION (3P)
INQUIRE PATTERN REPRESENTATION (3P)
INQUIRE PREDEFINED EXTENDED PATTERN REPRESENTATION (3P+)
Sun Release 4.0 — Last change: 1 August 1989