GCLEAR_WS(3NCARG)

✨ GCLEAR_WS ✨ (from the NCAR GRAPHICS manual, 3NCARG bestie πŸ’–)

okay so picture this: you've got a workstation, right? and it's got stuff all over it. gclear_ws is the girl who shows up with a lint roller and just... wipes it clean. that's the whole job. that's the gig. 🧹✨


🌸 NAME 🌸

gclear_ws β€” clears a workstation. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

#include <ncarg/gks.h>

void gclear_ws(Gint ws_id, Gctrl_flag ctrl_flag);

πŸ’… DESCRIPTION πŸ’…

  • ws_id (Input) β€” a number that IDs the workstation you wanna clear. no cap, this has to be the exact same ws_id you used in some previous gopen_ws call. like, it has to match. don't be out here making up numbers, she will not recognize you. πŸ™ˆ
  • ctrl_flag (Input) β€” tells her how to clear the workstation display surface. your options are:
    • GFLAG_COND β€” she checks first. is the display surface empty? if it is, she does not issue a clear surface command. lowkey respectful of her time. πŸ’…
    • GFLAG_ALWAYS β€” she issues a clear surface command no matter what. surface been written to? don't care. surface never been touched? also don't care. she's clearing. main character energy, no notes. πŸ‘‘

πŸ”₯ USAGE πŸ”₯

so this is where it gets type-dependent, bestie, buckle up:

  • for workstations of type "1" (CGM), gclear_ws gets interpreted as a picture termination in CGM generation. and here's the tea: if ctrl_flag = GFLAG_COND and no output primitives have been written in the current picture, then calling gclear_ws is a literal "do nothing" β€” she just vibes. otherwise, it generates an END PICTURE element (plus other picture initializing elements, she's thorough πŸ’–). and if ctrl_flag = GFLAG_ALWAYS, then calling gclear_ws generates an END PICTURE, full stop.
  • for workstations of types "7" or "8" β€” and yes, the man page for gopen_ws has the whole description of workstation types if you need it, iykyk β€” clear workstations erases all primitives that appear on the screen. like, gone gone. 🫢
  • for all other workstation types, clear workstation simply updates the workstation. that's it. that's the whole thing. not dramatic, just doing her little job. 🌸

🌈 ACCESS 🌈

to use the GKS C-binding routines, you gotta load the ncarg_gks and ncarg_c libraries. both of them. don't skip one, she'll know. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

Online: gopen_ws(3NCARG), gactivate_ws(3NCARG), gdeactivate_ws(3NCARG), gclose_ws(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.


okay that's the whole page, you ate it, you understood it, you're basically a GKS girlie now πŸŽ€βœ¨ mwah! this little legend comes from the UNIX manual, dated March 1993, page GCLEAR_WS(3NCARG), under the NCAR GRAPHICS umbrella β€” and yes, she's still iconic in 1993 and beyond πŸ’œπŸ¦‹