[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

CELL ARRAY (PHOP,*,STOP,*)

Purpose

Use Cell Array to create a two-dimensional (x, y) cell array primitive with the z coordinate assumed to be zero, and insert it into the open structure following the element pointer or replace the element pointed at by the element pointer with a Cell Array structure element, depending on the current edit mode.

This structure element defines a two-dimensional array of cells with individual colors. The primitive is defined by two points, P and Q, which define a rectangle aligned with the modeling coordinate axes. This rectangle is conceptually divided into a grid of DX by DY cells. Each cell has a width of |PX-QX|/DX, and a height of |PY-QY|/DY, where (PX,PY) are the coordinates of the corner point P, and (QX,QY) are the coordinates of the corner point Q. The color of each cell is specified by the index of the corresponding element of the color index array. The color indexes are mapped into the two-dimensional cell array on a row-wise basis starting at corner (PX,PY) and proceeding to corner Q and so on. If an index is not present in the color table on a workstation, then the graPHIGS API uses an index value of 1 on that workstation.

When the graPHIGS API encounters an element of this type, it does a minimal simulation by drawing the transformed boundaries of the cell rectangle using polyline color, a line width value of 1, and a line type of SOLID.

Language Bindings

C

pcell_array (rect, colr_array)

Input Parameters

const Prect *rect
Cell rectangle in MC.

const Ppat_rep *colr_array
Color array.

FORTRAN

PCA (px, py, qx, qy, dimx, dimy, isc, isr, dx, dy, colia)

Input Parameters

real px
x coordinate of the point P in MC.

real py
y coordinate of the point P in MC.

real qx
x coordinate of the point Q in MC.

real qy
y coordinate of the point Q in MC.

integer dimx
x dimension of COLIA which contains the cell array.

integer dimy
y dimension of COLIA which contains the cell array.

integer isc
Index of the start column of the cell array within COLIA.

integer isr
Index of the start row of the cell array within COLIA.

integer dx
Number of cell array columns.

integer dy
Number of cell array rows.

integer colia(dimx,dimy)
Color index array containing the cell array.

Errors

5
Function Requires State (PHOP,*,STOP,*)
117
One Dimension Of Color Index Array < Zero
113
Color Index Value < ZERO

Related Subroutines

  • Set Polyline Color Index


  • [ Previous | Next | Contents | Glossary | Home | Search ]