Provided by: libncarg-dev_6.3.0-6build1_amd64
gfill_area - output primitive for filling polygonal areas.
#include <ncarg/gks.h> void gfill_area(const Gpoint_list *point_list);
point_list.num_points (Gint, Input) - The number of points in the polygon to be filled. Must be greater than two. point_list.points (Gpoint *, Input) - The X and Y world coordinates of the polygon.
The area to be filled is delimited by the sequence of straight line segments connecting the successive points ((point_list.points.x, point_list.points.y), ...(point_list.points[point_list.num_points-1].x, point_list.points[point_list.num_points-1].y)) The last point in the polygon is connected to the first point with a straight line segment in the case that it is not the same as the first point. Given a polygon whose edges cross 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, draw a ray starting at that point and going to infinity in any direction; if the number of intersections between the ray and the polygon is odd, the point is within the polygon, otherwise it is outside. If the straight line passes through 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. Several interior styles (hollow, solid, and various hatch patterns) can be selected. See the man pages for gset_fill_int_style and gset_fill_style_ind for these. Note well: By default in GKS, the interior fill style is hollow, or no fill. If you call gfill_area and do not get a filled interior as you expected, you will probably need to call gset_fill_int_style to set the fill style to something other than "hollow".
To use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries.
Online: gset_fill_int_style(3NCARG), gset_fill_style_ind(3NCARG), gset_colr_rep(3NCARG), gset_fill_colr_ind(3NCARG), ginq_fill_int_style(3NCARG), ginq_fill_style_ind(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG) Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.