1GFILL_AREA(3NCARG) NCAR GRAPHICS GFILL_AREA(3NCARG)
2
3
4
6 gfill_area (Fill area) - output primitive for filling polygonal areas.
7
9 #include <ncarg/gks.h>
10
11 void gfill_area(const Gpoint_list *point_list);
12
14 point_list.num_points
15 (Gint, Input) - The number of points in the polygon to be
16 filled. Must be greater than two.
17
18 point_list.points
19 (Gpoint *, Input) - The X and Y world coordinates of the
20 polygon.
21
23 The area to be filled is delimited by the sequence of straight line
24 segments connecting the successive points ((point_list.points[0].x,
25 point_list.points[0].y),
26 ...(point_list.points[point_list.num_points-1].x,
27 point_list.points[point_list.num_points-1].y)) The last point in the
28 polygon is connected to the first point with a straight line segment in
29 the case that it is not the same as the first point.
30
31 Given a polygon whose edges cross each other, it becomes ambiguous as
32 to what constitutes the "inside" of the polygon. The algorithm used in
33 GKS is as follows: for a given point, draw a ray starting at that point
34 and going to infinity in any direction; if the number of intersections
35 between the ray and the polygon is odd, the point is within the poly‐
36 gon, otherwise it is outside. If the straight line passes through a
37 polygon vertex tangentially, the intersection count is not affected.
38 If a point is within the polygon, it is included in the area to be
39 filled.
40
41 Several interior styles (hollow, solid, and various hatch patterns) can
42 be selected. See the man pages for gset_fill_int_style and
43 gset_fill_style_ind for these.
44
45 Note well: By default in GKS, the interior fill style is hollow, or no
46 fill. If you call gfill_area and do not get a filled interior as you
47 expected, you will probably need to call gset_fill_int_style to set the
48 fill style to something other than "hollow".
49
51 To use the GKS C-binding routines, load the ncarg_gks and ncarg_c
52 libraries.
53
55 Online: gset_fill_int_style(3NCARG), gset_fill_style_ind(3NCARG),
56 gset_colr_rep(3NCARG), gset_fill_colr_ind(3NCARG),
57 ginq_fill_int_style(3NCARG), ginq_fill_style_ind(3NCARG), gks(3NCARG),
58 ncarg_gks_cbind(3NCARG)
59
60 Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Funda‐
61 mentals, UNIX Version
62
64 Copyright (C) 1987-2007
65 University Corporation for Atmospheric Research
66
67 This documentation is free software; you can redistribute it and/or
68 modify it under the terms of the GNU General Public License as pub‐
69 lished by the Free Software Foundation; either version 2 of the
70 License, or (at your option) any later version.
71
72 This software is distributed in the hope that it will be useful, but
73 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
74 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
75 Public License for more details.
76
77 You should have received a copy of the GNU General Public License along
78 with this software; if not, write to the Free Software Foundation,
79 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
80
81
82
83UNIX March 1993 GFILL_AREA(3NCARG)