GCLRWK(3NCARG)

πŸ’– GCLRWK β€” bestie, let's clear a workstation πŸ’–

okay so this is GCLRWK, from the NCAR GRAPHICS corner of the 3NCARG manual, and she is exactly what she sounds like: she clears a GKS workstation. that's the whole job. she's not complicated, she's just important. 🧚✨


✨ NAME ✨

GCLRWK β€” clears a GKS workstation πŸ§ΌπŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

CALL GCLRWK (WKID, COFL)

🌸 C-BINDING SYNOPSIS 🌸

#include <ncarg/gks.h>

void gclear_ws(Gint ws_id, Gctrl_flag  ctrl_flag);

πŸ’œ DESCRIPTION πŸ’œ

so there's two things you gotta hand her, and she'll handle the rest:

  • WKID β€” (Integer, Input) β€” this is the number that ID's the workstation you wanna clear. ⚠️ important: WKID must be the same as the one you used in some previous GOPWK call. like, she needs to recognize the girl. no random numbers, bestie, she will not know who you are. πŸ™ˆ
  • COFL β€” (Integer, Input) β€” this is the "clear the workstation display surface" flag, and you've got two options, no in-between:
    • 0 β€” check first whether the display surface is empty. if it is empty, don't issue a clear surface command at all. respectful. efficient. iconic. ✨
    • 1 β€” issue a clear surface command, periodt. whether the surface has been written to or not. no questions asked. πŸ’…

πŸ”₯ USAGE πŸ”₯

okay this is where it gets type-dependent, so pay attention bestie, because the vibe completely changes depending on what kind of workstation you're on πŸ‘‘

for workstations of type "1" (CGM): GCLRWK gets interpreted as a picture termination in CGM generation. so:

  • if COFL = 0 and no output primitives have been written in the current picture, then a call to GCLRWK is literally a "do nothing". like, she shows up and does nothing. valid.
  • otherwise, it generates an END PICTURE element (plus other picture initializing elements, so, a whole little ensemble πŸŽ€).
  • if COFL = 1, then a call to GCLRWK generates an END PICTURE. simple as that.

for workstations of types "7" or "8": (peep the man page for GOPWK if you want the full description of workstation types, iykyk) β€” clear workstations erases all primitives that appear on the screen. gone. deleted. not me erasing your whole drawing 😭

for all other workstation types: clear workstation simply updates the workstation. that's it. lowkey chill. 🌈


🌟 ACCESS 🌟

to use the GKS routines, load the NCAR GKS-0A library ncarg_gks. that's the whole access situation, bestie. 🫢


πŸŽ€ SEE ALSO πŸŽ€

Online: gopwk, gacwk, gdawk, gclwk, gclear_ws

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.


and that's the whole page, bestie πŸ’– this one came out of the UNIX manual, dated March 1993, filed under GCLRWK(3NCARG) β€” go clear something, slay, and remember: WKID has to match your GOPWK. no cap. πŸ¦‹βœ¨