Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pca(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CELL ARRAY(3P)  —  SUNPHIGS LIBRARY

NAME

CELL ARRAY − create structure element specifying 2D cell array

SYNOPSIS

C Syntax

void
pcellarray ( rectangle, dim, colour_index )
Prect∗rectangle;cell rectangle
Pdim∗dim;dimension of cell: DX and DY
Pint∗colour_index;colour index array

FORTRAN Syntax

SUBROUTINE pca ( PX, PY, QX, QY, DIMX, DIMY, ISC, ISR, DX, DY, COLIA )
REALPX, PY, QX, QYtwo points (P, Q) (MC)
INTEGERDIMX, DIMYthe dimensions of COLIA which contains
the cell array
INTEGERISC, ISRindices of start column, start row
INTEGERDX, DYnumber of columns, number of rows
INTEGERCOLIA(DIMX, DIMY) colour index array

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

The CELL ARRAY function places a structure element containing the full specification of a 2D cell array into the currently open structure, according to the current edit mode.  A 2D cell array primitive is an array of cells with individual colours.  Its area is defined by two points in Modelling Coordinates giving the opposite corners of a rectangle, which is taken to be aligned with the modelling coordinate axes. 

If the current edit mode is INSERT, the CELL ARRAY element is inserted into the open structure after the element pointed to by the element pointer. If the edit mode is REPLACE, the CELL ARRAY element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new CELL ARRAY element. 

Note: SunPHIGS supports the minimal allowed simulation for the CELL ARRAY primitive by drawing the transformed boundaries of the cell rectangle. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

rectangle
A pointer to a Prect structure giving the lower left and upper right corners of the rectangle that defines the area of the CELL ARRAY element.  The Prect structure is defined as:

typedef struct  {
Ppointll;/∗ lower left ∗/
Ppointur;/∗ upper right ∗/
} Prect;

The Ppoint structure is defined as:

typedef struct  {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

dimA pointer to a Pdim structure specifying the dimensions of the colour_index array.  The Pdim structure is defined as:

typedef struct  {
Pintx_dim;/∗ dimension (number of divisions) along x ∗/
Pinty_dim;/∗ dimension (number of divisions) along y ∗/
} Pdim;

colour_index
An integer pointer to an array of the dimensions defined by dim, containing the colour indices specifying cell colours.

FORTRAN Input Parameters

PXThe x coordinate of the point giving the position of one corner of the rectangle that defines the area of the CELL ARRAY element. 

PYThe y coordinate of the point giving the position of one corner of the rectangle that defines the area of the CELL ARRAY element. 

QXThe x coordinate of the point giving the position of the opposite corner of the rectangle that defines the area of the CELL ARRAY element. 

QYThe y coordinate of the point giving the position of the opposite corner of the rectangle that defines the area of the CELL ARRAY element. 

DIMXThe x dimension, or number of columns, of the entire COLIA array. 

DIMYThe y dimension, or number of rows, of the entire COLIA array. 

ISCThe application may specify a portion of the COLIA array by indicating a starting position and number of rows and columms of the sub-array.  ISC is the x coordinate, or start column, of the sub-array.  To pass the entire array, this value should be one. 

ISRThe y coordinate, or start row, of the sub-arra.  To pass the entire array, this value should be one. 

DXThe x dimension, or number of columns, of the sub-array.  To pass the entire array, this value should be the same as that of DIMX . 

DYThe y dimension, or number of rows, of the sub-array.  To pass the entire array, this value should be the same as that of DIMY . 

COLIA
An array of integers containing the colour indices specifying cell colours.

Execution

When the structure is traversed, the cell array element draws the transformed boundaries of the cell rectangle, using the polyline attributes currently in effect.  This is the mimimal simulation for cell arrays. Applications should not depend on this behaviour to remain the same in future releases. 

The aspect source flags (ASFs) for line type, line width scale factor, and polyline colour index control whether the values used for these attributes are taken from the polyline representation specified by POLYLINE INDEX (ASF = BUNDLED), or from the individual specifications set for these attributes (ASF = INDIVIDUAL). 

The coordinates used to specify the position of the cell array primitive are Modelling Coordinates.  These may be any coordinate units that are convenient to the application.  At traversal, these coordinate values will be transformed by the current Local and Global Modelling Transformations, the view representation selected by the current view index, and the workstation transformation current on the workstation to which the structure is posted. 

Attributes Applied

The current values of the following attributes will be used to display the CELL ARRAY primitive when the structure is traversed.  The value of an attribute is modified with the appropriate SET routine.  The Aspect Source Flags (ASFs) tell where to access the output display attributes.  These attributes can come directly from the traversal state list, or they can be accessed indirectly, using the appropriate index in the traversal state list and the corresponding bundled representation in the workstation state list. 

polyline colourpolyline colour index ASF
linewidth scale factorlinewidth scale factor ASF
linetypelinetype ASF
polyline shading methodpolyline shading method ASF
polyline index
depth cue index
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

113Ignoring function, the colour index value is less than zero

117Ignoring function, one of the dimensions of the colour index array is less than zero

SEE ALSO

CELL ARRAY 3 (3P)

Sun Release 4.0  —  Last change: 31 July 1989

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