LBFILL(3NCARG)

πŸ’– LBFILL β€” the little fill guy behind your label bar πŸ’–

okay bestie, gather round β€” this is LBFILL, a routine from the NCAR Graphics fam (you'll see it filed under 3NCARG in the manual pages). It's the little helper that LBLBAR calls when the argument IFTP is non-zero, and its whole job is filling in portions of the bar. The default version does a color fill by calling GSFACI and GFA. But here's the slay part: you can write your own version to do a completely different kind of fill. Main character energy, honestly. πŸ‘‘


✨ SYNOPSIS ✨

CALL LBFILL (IFTP, XCRA, YCRA, NCRA, INDX)

🌸 DESCRIPTION 🌸

  • IFTP β€” an input expression of type INTEGER. It's literally just the value of the argument IFTP from your call to LBLBAR. Same number, passed straight through. πŸ’…
  • XCRA, YCRA β€” input arrays of type REAL, holding the X and Y coordinates of five points that define a rectangular box. That box is the thing getting filled, in some manner or another. And heads up: the fifth point defined by these arrays will always be a duplicate of the first. Not a typo, not a bug, just how it is. πŸŽ€
  • NCRA β€” an input expression of type INTEGER, the number of points defining that rectangular box. Its value will always be five. Yes, always. The box has spoken. πŸ¦‹
  • INDX β€” an input expression of type INTEGER, and it's one of the indices from the array LFIN in your call to LBLBAR. Its value may be used as a color index or as a pattern selector β€” dealer's choice, bestie. ✨

πŸ”₯ USAGE πŸ”₯

So LBLBAR calls this routine whenever LBLBAR's argument IFTP is non-zero. And it doesn't just call it once β€” it calls LBFILL once for each sub-box in the label bar, using a statement shaped exactly like this:

CALL LBFILL (IFTP,XCRA,YCRA,NCRA,INDX)

And the routine is expected to fill the sub-box defined by its arguments. That's the whole assignment. πŸ“

The default version of the routine looks like this, no cap:

SUBROUTINE LBFILL (IFTP,XCRA,YCRA,NCRA,INDX)
  DIMENSION XCRA(*),YCRA(*)
  CALL GSFACI (INDX)
  CALL GFA (NCRA-1,XCRA,YCRA)
  RETURN
END

This version does a color fill of the box, using the last argument as a color index. Simple, clean, iconic. πŸ’–

The user may replace this routine with a version that does any desired sort of fill. And usually? That's easy β€” you can typically do it by simply compiling the desired version, so that the default one from the package will not be loaded. The impostor gets left at the door. πŸšͺ✨


πŸ’œ ACCESS πŸ’œ

To use LBFILL, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” and preferably in that order, bestie. Order matters, trust. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Online: labelbar, labelbar_params, lbgeti, lbgetr, lblbar, lbseti, lbsetr, ncarg_cbind

Hardcopy: 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.


and that's the whole page, bestie β€” LBFILL(3NCARG), filed under UNIX, dated March 1993, from the NCAR Graphics collection. go fill some boxes, you absolute legend πŸ’…βœ¨πŸŽ€