------------------------------------------------ Argument | Type | Mode | Dimension ------------------------------------------------ CALL GFA (N, | Integer | Input | X, | Real | Input | N Y) | Real | Input | N ------------------------------------------------
-------------------------------------------------------------------------- C Synopsis #include <ncarg/gks.h> void gfill_area( const Gpoint_list *point_list /* list of points */ ); --------------------------------------------------------------------------
Given a polygon whose edges cross over each other, it becomes ambiguous as to what constitutes the "inside" of the polygon. The algorithm used in GKS is as follows: for a given point, create a straight line starting at that point and going to infinity in any direction. If the number of intersections between the straight line and the polygon is odd, the point is within the polygon; otherwise it is outside. If the straight line passes a polygon vertex tangentially, the intersection count is not affected. If a point is within the polygon, it is included in the area to be filled. Figure 16 illustrates the effects of this algorithm. The polygon on the left has ten distinct vertices as labeled, and the inside is as shown. The polygon on the right has five distinct vertices as labeled, and the edges cross one another. The inside is as shown.
--------------------------------------------------- Argument | Type | Mode | Dimension --------------------------------------------------- CALL GSFAIS (INTS) | Integer | Input | ---------------------------------------------------
-------------------------------------------------------------------------- C Synopsis #include <ncarg/gks.h> void gset_fill_int_style( Gfill_int_style fill_int_style /* fill interior style */ ); --------------------------------------------------------------------------Figure 17 below illustrates various fill area interior styles.
--------------------------------------------------- Argument | Type | Mode | Dimension --------------------------------------------------- CALL GSFASI (STYLI) | Integer | Input | ---------------------------------------------------
----------------------------------------------------------------------- C Synopsis #include <ncarg/gks.h> void gset_fill_style_ind( Gint fill_style_ind /* fill style index */ ); -----------------------------------------------------------------------
---------------------------------------------------- Argument | Type | Mode | Dimension ---------------------------------------------------- CALL GQFAIS (ERRIND, | Integer | Output | INTS) | Integer | Output | ----------------------------------------------------
-------------------------------------------------------------------------- C Synopsis #include <ncarg/gks.h> void ginq_fill_int_style( Gint *err_ind, /* error indicator */ Gfill_int_style *fill_int_style /* fill interior style */ ); --------------------------------------------------------------------------
---------------------------------------------------- Argument | Type | Mode | Dimension ---------------------------------------------------- CALL GQFASI (ERRIND, | Integer | Output | STYLI) | Integer | Output | ----------------------------------------------------
------------------------------------------------------------------------ C Synopsis #include <ncarg/gks.h> void ginq_fill_style_ind( Gint *err_ind, /* error indicator */ Gint *fill_style_ind /* fill style index */ ); ------------------------------------------------------------------------