Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pcell_array(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pcell_array(3g)  —  Subroutines

Name

pcell_array − Divides a designated rectangular area into cells, and displays each cell in a specified color. 

 
Operating States: PHOP, ∗, STOP, ∗
PHIGS standard function
Creates a structure element

Syntax

void pcell_array (
  const Prect      ∗rect,        /∗ (I) Cell rectangle ∗/
  const Ppat_rep   ∗colr_array   /∗ (I) Color array ∗/
)

Data Structures

typedef struct {
    Ppoint    p;    /∗ point p, lower left corner ∗/
    Ppoint    q;    /∗ point p, upper right corner ∗/
} Prect;
    typedef struct {
        Pfloat   x;   /∗ x coordinate ∗/
        Pfloat   y;   /∗ y coordinate ∗/
    } Ppoint;
typedef struct {
    Pint_size    dims;         /∗ pattern’s dimensions ∗/
    Pint        ∗colr_array;   /∗ color index array ∗/
} Ppat_rep;
    typedef struct {
        Pint     size_x;   /∗ x size ∗/
        Pint     size_y;   /∗ y size ∗/
    } Pint_size;

Description

pcell_array divides a designated rectangular area into cells, and displays each cell in a specified color. 

  Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer.  The pointer then points to the new cell array element. 

You pass a two-dimensional array containing color index values as one argument to this function.  Digital PHIGS maps the color index values to corresponding cells within a rectangular area of the workstation surface. 

There is a one-to-one correspondence between the number of specified array columns and rows, and the number of columns and rows by which Digital PHIGS divides the cell array rectangle. Each of the columns within the rectangle is of equal width, and each of the rows within the rectangle is of equal height.  Digital PHIGS maps the color index values from each specified color index array element to the corresponding cell, moving from the starting point towards the diagonal point along the x-axis. 

For more information on the initial color index values for a given workstation, see the Device Specifics Reference Manual for DEC GKS and DEC PHIGS. 

To alter the color associated with a certain index value, you can use the function pset_colr_rep. 

If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element. 

Digital PHIGS Version 4.1 does not support this function.

See Also

padd_names_set
pcell_array3
pcell_array3_plus
pset_back_refl_model
pset_back_refl_props
pset_facet_cull_mode
pset_facet_disting_mode
pset_light_source_st
pset_refl_model
pset_refl_props

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