GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


GFA

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



Purpose



 GFA  (n, px, py)
   
 APL code  1315
 GKS RCP code  X'38000F00' (939527936)
   


Function: To fill area.

Output function. Defines a polygon and fills it using current fill area attributes.

Parameters


n (specified by user) (fullword integer)
The number of points in the polygon.

px (specified by user) (array of short floating-point numbers)

py (specified by user) (array of short floating-point numbers)
The coordinates of the points, in world coordinates.


Operating states


WSAC, SGOP

Related functions


Set fill area index (GSFAI), Set fill area representation (GSFAR), Set fill area interior style (GSFAIS), Set fill area style index (GSFASI), Set fill area color index (GSFACI), Set window (GSWN).

Description


This function fills the polygon described by the input points, using the current fill area attributes.

If the interior style is hollow, the boundary of the polygon is drawn instead using the fill area color index. The boundary is not drawn for other styles.

The fill area is subject to all transformations; however, interior styles pattern and hatch are unaffected by transformations.

If clipping is on, the fill area is clipped to the window. If parts of the fill area are clipped, the resulting new boundaries become part of the area boundaries. Multiple subareas may be generated.

The first illustration on the next page shows the effect of clipping on fill area boundaries.

The second illustration shows how GKS defines the interior of a polygon. For a given point, create a straight line starting at that point and going to infinity. If the number of intersections between the straight line and the polygon is odd, the point is within the polygon. If the number of intersections is even, the point is outside. If the straight line passes a polygon vertex tangentially, the intersection count is not affected.


   PICTURE 27          


   PICTURE 28          

Principal errors


5
GKS not in proper state: GKS shall be either in the state WSAC or in the state SGOP
100
Number of points is invalid

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012