GCELL_ARRAY(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

πŸ’… GCELL_ARRAY β€” bestie edition

okay so this is gcell_array from the NCAR Graphics crew (manual section 3NCARG), and honestly? it's giving artsy. it's the Cell array routine, and what it does is: you hand it a rectangle defined by two corner points, it chops that rectangle up into a bunch of lil subrectangles (we call them cells, periodt), and then every single cell gets a color and gets drawn in that color. slay. 🎨✨


✨ NAME ✨

gcell_array (Cell array) β€” draws a cell array starting with a rectangle specified by two corner points; this initial rectangle is subdivided into subrectangles by specifying an arbitrary number of divisions in the X and Y directions; each subrectangle (or cell) is assigned a color and drawn with that color. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <ncarg/gks.h>

void gcell_array(const Grect *rect, const Gpat_rep *colr_array);

πŸ¦‹ DESCRIPTION πŸ¦‹

here's the whole cast of characters, bestie β€” every field, no skips:

  • rect.p.x (Gfloat, Input) β€” X world coordinate of point 1.
  • rect.p.y (Gfloat, Input) β€” Y world coordinate of point 1.
  • rect.q.x (Gfloat, Input) β€” X world coordinate of point 2.
  • rect.q.y (Gfloat, Input) β€” Y world coordinate of point 2.
  • colr_array.dims.size_x (Gint, Input) β€” X dimension of the color index array colr_array.colr_array.
  • colr_array.dims.size_y (Gint, Input) β€” Y dimension of the color index array colr_array.colr_array.
  • colr_array.colr_array (*Gint **, Input) β€” an array of color indices, dimensioned colr_array.dims.size_x by colr_array.dims.size_y, which is used to determine the color of each cell drawn. this is literally the glow-up source for every cell. πŸ’œ

🌸 USAGE 🌸

Points 1 and 2 must be diagonally opposite corner points of a rectangle. that rectangle then gets divided into colr_array.dims.size_x cells along the X dimension and colr_array.dims.size_y cells along the Y dimension. no cap. πŸ“


🌈 ACCESS 🌈

to use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's the vibe check for getting this running. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Online:

  • gset_colr_rep(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.

fr fr, read the license before you go wild with it. πŸ“

and that's the whole page, bestie!! this one's dated March 1993, comes from the UNIX side of things, and lives in the manual as GCELL_ARRAY(3NCARG). iconic behavior from a routine older than most of us ngl πŸ˜­πŸ’…βœ¨

πŸ“¦ where this page comes from