FILL AREA(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
FILL AREA − create a structure element specifying a 2D fill area primitive
SYNOPSIS
C Syntax
void
pfill_area ( point_list )
Ppoint_list∗point_list;array of points
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
The FILL AREA function puts a structure element containing the 2D specification of a FILL AREA primitive into the currently open structure. The FILL AREA primitive is a closed polygonal area defined by a series of two dimensional points in Modelling Coordinates. The z coordinate is assumed to be 0.
Note: The FILL AREA primitive INTERIOR attributes control the representation of the interior of the area defined by the specified coordinate points. FILL AREA does not have separate edge attributes. See the FILL AREA SET and FILL AREA SET 3 primitives for independent control of the edge properties.
If the current edit mode is INSERT, the structure element created by the FILL AREA subroutine is inserted into the open structure after the element pointed to by the structure’s element pointer. If the edit mode is REPLACE, the FILL AREA element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new FILL AREA element.
C Input Parameters
point_list
A pointer to a list num_points long of Ppoint structures containing the x and y coordinates for each point used to define the FILL AREA polygon. The Ppoint_list structure is defined in phigs.h as follows:
typedef struct {
Pintnum_points;/∗ number of Ppoints in the list ∗/
Ppoint∗points;/∗ list of points ∗/
} Ppoint_list;
Ppoint is defined as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;
Execution
When the structure is traversed, the FILL AREA element draws a closed polygonal area. The appearance of the interior of the defined area is determined by the attributes listed below. These attributes control the type of fill (SOLID, EMPTY, HOLLOW, HATCH, and PATTERN) and the colour with which the primitive is drawn.
The points are specified in Modelling Coordinates. These may be any coordinate units that are convenient to the application. At traversal, these coordinate values are 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 attributes listed below are used to display the FILL AREA primitive when the structure is traversed. 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 PHIGS workstation state list.
interior colourinterior colour index ASF
back interior colourback interior colour ASF
interior styleinterior style ASF
back interior styleback interior style ASF
interior style indexinterior style index ASF
back interior style indexback interior style index ASF
interior shading methodinterior shading method ASF
back interior shading methodback interior shading method ASF
interior reflectance equation interior reflectance equation ASF
back interior reflectance equationback interior reflectance equation ASF
area propertiesarea properties ASF
back area propertiesback area properties ASF
interior index
face distinguishing mode
face culling mode
depth cue index
light source state
name set
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
FILL AREA 3 (3P)
FILL AREA SET (3P)
FILL AREA SET 3 WITH DATA (3P+)
September 02, 1992