GFILL_AREA(3NCARG)
π GFILL_AREA(3NCARG) β bestie edition π
okay so welcome to the NCAR GRAPHICS corner of the manual, babes, and today's main character is gfill_area from the 3NCARG section π
β¨ NAME β¨
gfill_area (Fill area) β the output primitive that fills polygonal areas, no cap π«Ά
πΈ SYNOPSIS πΈ
#include <ncarg/gks.h>
void gfill_area(const Gpoint_list *point_list);
π¦ DESCRIPTION π¦
point_list.num_pointsβ (Gint, Input) β how many points are in the polygon you're filling. Must be greater than two, bestie. Two points is not a polygon, it's a line, it's giving nothing πpoint_list.pointsβ (Gpoint *, Input) β the X and Y world coordinates of the polygon. literally the whole shape, right there β¨
π USAGE π
So the area you're filling is delimited by a sequence of straight line segments that connect the successive points, going
(point_list.points[0].x, point_list.points[0].y), ... (point_list.points[point_list.num_points-1].x, point_list.points[point_list.num_points-1].y) π
and the last point in the polygon gets connected back to the first point with a straight line segment, but only in the case that it is not the same as the first point. closure, but make it conditional π
okay now the spicy part π if you've got a polygon whose edges cross each other, it becomes ambiguous as to what even counts as the "inside" of the polygon. like, girl, where is the inside. nobody knows. so here's the algorithm GKS uses: 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. and 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. periodt β¨
Several interior styles (hollow, solid, and various hatch patterns) can be selected β go check the man pages for gset_fill_int_style and gset_fill_style_ind for those, iykyk π
β οΈ Note well: by default in GKS, the interior fill style is hollow, or no fill. So if you callgfill_areaand do not get a filled interior as you expected, you will probably need to callgset_fill_int_styleto set the fill style to something other than "hollow". bestie this one gets everybody, it's the classic. you're not broken, your fill style is just hollow ππ
π₯ ACCESS π₯
To use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's it, that's the step π«Ά
β SEE ALSO β
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) β a whole reading list, slay π
Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version π
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
okay that's the whole page, you ate it, go fill some polygons πΈπ¦
this was the GFILL_AREA(3NCARG) page from the UNIX manual, dated March 1993 β mwah, drink water, and remember: hollow is the default, always check your fill style πβ¨π
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms