GCLEAR_WS(3NCARG)

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

✨ GCLEAR_WS πŸ’–

okay bestie, welcome to the NCAR Graphics corner of the man pages β€” this one is all about gclear_ws, aka the Clear workstation routine, and yes it does exactly what it says on the tin: it clears a workstation. 🧼✨


🌸 NAME 🌸

gclear_ws (Clear workstation) β€” clears a workstation. that's it, that's the whole vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

lowkey the whole incantation looks like this:

#include <ncarg/gks.h>

void gclear_ws(Gint ws_id, Gctrl_flag  ctrl_flag);

two args, one function, zero drama. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

  • ws_id (Input) β€” a number that identifies the workstation to be cleared. bestie, it must be the same one you used in some previous gopen_ws call β€” no making up new numbers, the vibes have to match. πŸ”’
  • ctrl_flag (Input) β€” clear the workstation display surface. your options are:
    • GFLAG_COND β€” check to see if the display surface is empty. if it is empty, then do not issue a clear surface command. girl is polite, she checks first. πŸ™ˆ
    • GFLAG_ALWAYS β€” issue a clear surface command whether the surface has been written to or not. no thoughts, head empty, clear it anyway. πŸ”₯

🌈 USAGE 🌈

so here's the tea, and it depends on your workstation type:

for workstations of type "1" (CGM), gclear_ws is interpreted as a picture termination in CGM generation. and like, if ctrl_flag = GFLAG_COND and no output primitives have been written in the current picture, then calling gclear_ws is a "do nothing" β€” literally nothing happens, iconic behaviour honestly. otherwise, it generates an END PICTURE element (plus other picture initializing elements, because it's extra like that ✨). and if ctrl_flag = GFLAG_ALWAYS, then a call to gclear_ws generates an END PICTURE. periodt. πŸ’…

for workstations of types "7" or "8" (peep the man page for gopen_ws if you wanna know what workstation types even are), clear workstations erases all primitives that appear on the screen. gone. erased. poof. πŸ’€

for all other workstation types, clear workstation simply updates the workstation. no biggie, just a lil refresh. 🫢


πŸ”‘ ACCESS πŸ”‘

to use the GKS C-binding routines, you gotta load the ncarg_gks and ncarg_c libraries. don't forget, or the linker will be in your mentions. 😭


πŸ‘€ 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.

yes bestie, there's a license agreement, pls respect it πŸŽ€


and that's the whole page!! this lil slice of NCAR GRAPHICS is brought to you by the UNIX manual, dated March 1993 β€” vintage but still slaying πŸ’–βœ¨ no cap, go clear that workstation. πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from