.\"
.\" $XConsortium: p056,v 5.2 94/04/17 20:54:55 rws Exp $
.\"
.\" 
$XMCOPY
.\" Copyright (c) 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
.\" 
.\"                         All Rights Reserved
.\" 
.\" Permission to use, copy, modify, and distribute this software and its 
.\" documentation for any purpose and without fee is hereby granted, 
.\" provided that the above copyright notice appear in all copies and that
.\" both that copyright notice and this permission notice appear in 
.\" supporting documentation, and that the names of Sun Microsystems,
.\" and the X Consortium not be used in advertising or publicity 
.\" pertaining to distribution of the software without specific, written 
.\" prior permission.  
.\" 
.\" SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\" EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\" USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.TH "FILL AREA" 3P "29 February 1991"
.SH NAME
FILL AREA \- create a structure element specifying a \s-2\&2D\s+2 fill area primitive
.IX "Filled Area Primitives" "FILL AREA"
.IX "Primitives, Filled Area Primitives" "FILL AREA"
.IX "Polygons, Filled Area Primitives" "FILL AREA"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pfill_area ( point_list )
Ppoint_list	*point_list;	\fIarray of points\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
The \s-2FILL AREA\s+2 function puts a structure element containing
the \s-2\&2D\s+2 specification of a \s-2FILL AREA\s+2 primitive
into the currently open structure.
The \s-2FILL AREA\s+2 primitive is a closed polygonal area defined
by a series of two dimensional points in Modelling Coordinates.
The \fIz\fP coordinate is assumed to be 0.
.LP
\fBNote:\fP The \s-2FILL AREA\s+2 primitive \s-2INTERIOR\s+2 attributes
control the representation of the interior of the area defined by the
specified coordinate points. \s-2FILL AREA\s+2 does not have separate
edge attributes. See the \s-2FILL AREA SET\s+2 and \s-2FILL AREA SET 3\s+2
primitives for independent control of the edge properties.
.LP
If the current edit mode is \s-2INSERT\s+2, the structure element created
by the \s-2FILL AREA\s+2 subroutine is inserted into the open structure
after the element pointed to by the structure's element pointer. If the edit
mode is \s-2REPLACE\s+2, the \s-2FILL AREA\s+2 element replaces the element
pointed to by the element pointer. In either case, the element pointer is
updated to point to the new \s-2FILL AREA\s+2 element.
.LP
.SS C Input Parameters
.IP \fIpoint_list\fP
A pointer to a list \fInum_points\fP long of Ppoint structures containing
the \fIx\fP and \fIy\fP coordinates for each point used to define
the \s-2FILL AREA\s+2 polygon.
The Ppoint_list structure is defined in phigs.h as follows:
.sp .4
.ta .5i +\w'Ppoint     'u +\w'num_points;     'u
.nf
typedef struct  {
.sp .2
	Pint	num_points;	/* number of Ppoints in the list */
	Ppoint	*points;	/* list of points */
.sp .2
} Ppoint_list;
.fi
.IP
Ppoint is defined as follows:
.sp .4
.ta .5i +1i	+1i
.nf
.sp .2
typedef struct {
	Pfloat	x;	/* x coordinate */
	Pfloat	y;	/* y coordinate */
} Ppoint;
.fi
.SS Execution
When the structure is traversed, the \s-2FILL AREA\s+2 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
(\s-2SOLID, EMPTY, HOLLOW, HATCH\s+2, and \s-2PATTERN\s+2) and the colour
with which the primitive is drawn.
.LP
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 \fIcurrent view index\fP,
and the Workstation Transformation current
on the workstation to which the structure is posted.
.SS Attributes Applied
The attributes listed below are used to display the
\s-2FILL AREA\s+2 primitive when the structure is traversed. The Aspect Source 
Flags (\s-2ASF\s+2s) 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.
.RS
.nf
.ta .5i +\w'back interior reflectance equation   'u 
.sp
interior colour			interior colour index \s-2ASF\s+2
back interior colour		back interior colour \s-2ASF\s+2
interior style			interior style \s-2ASF\s+2
back interior style		back interior style \s-2ASF\s+2
interior style index		interior style index \s-2ASF\s+2
back interior style index	back interior style index \s-2ASF\s+2
interior shading method		interior shading method \s-2ASF\s+2
back interior shading method	back interior shading method \s-2ASF\s+2
interior reflectance equation 	interior reflectance equation \s-2ASF\s+2
back interior reflectance equation	back interior reflectance equation \s-2ASF\s+2
area properties			area properties \s-2ASF\s+2
back area properties		back area properties \s-2ASF\s+2
interior index
face distinguishing mode
face culling mode
depth cue index
light source state
name set
.fi
.RE
.sp .2
.SH ERRORS
.IP 005
Ignoring function, function requires state (\s-2PHOP, *, STOP, *\s+2)
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "FILL AREA 3 (3P)"
.SM "FILL AREA SET (3P)"
.SM "FILL AREA SET 3 WITH DATA (3P+)"
.fi
