NCARG_GKS_CBIND(3NCARG)
π NCAR Graphics GKS C-binding π
okay bestie, so this page is the tea on the NCAR Graphics GKS C-binding β it lives in the NCAR GRAPHICS manual, section 3NCARG, and it's literally just telling you how to use it. no cap.
β¨ NAME β¨
NCAR Graphics GKS C-binding β a whole description of how to use the NCAR Graphics GKS C-binding. that's it, that's the name, we're so back π«Ά
π SYNOPSIS π
okay so this section is only giving briefly how to use the NCAR Graphics GKS C-binding. like, it's the vibe check, not the whole lore.
if you're gonna use the GKS C-bindings heavily, you might wanna get yourself a copy of the American National Standard's "Computer Graphics - Graphical Kernel System (GKS) - Functional Description". yes queen, get the standard, it's giving academic π
and if you want the info on how to use the C-bindings for the NCAR Graphics utilities, go look at ncarg_cbind(3NCARG) or the man page for literally any of the NCAR Graphics routines. iykyk.
so here's the thing: the NCAR Graphics GKS C-binding adheres to the ISO/IEC standard. only the functions at level 0A have been implemented. and at the time, not all of these functions are supported β only the ones that have man pages associated with them are supported. periodt.
below is the list of the currently supported NCAR Graphics GKS C-bindings:
gaccum_tran_matrix
gactivate_ws
gcell_array
gclear_ws
gclose_gks
gclose_seg
gclose_ws
gcopy_seg_ws
gcreate_seg
gdeactivate_ws
gdel_seg
gescape
geval_tran_matrix
gfill_area
ginq_asfs
ginq_char_expan
ginq_char_ht
ginq_char_space
ginq_char_up_vec
ginq_clip
ginq_colr_rep
ginq_cur_norm_tran_num
ginq_fill_colr_ind
ginq_fill_int_style
ginq_fill_style_ind
ginq_line_colr_ind
ginq_linetype
ginq_linewidth
ginq_marker_colr_ind
ginq_marker_size
ginq_marker_type
ginq_max_norm_tran_num
ginq_name_open_seg
ginq_norm_tran
ginq_op_st
ginq_set_seg_names
ginq_text_align
ginq_text_colr_ind
ginq_text_font_prec
ginq_text_path
gopen_gks
gopen_ws
gpolyline
gpolymarker
gsel_norm_tran
gset_asfs
gset_char_expan
gset_char_ht
gset_char_space
gset_char_up_vec
gset_clip_ind
gset_colr_rep
gset_fill_colr_ind
gset_fill_int_style
gset_fill_style_ind
gset_line_colr_ind
gset_linetype
gset_linewidth
gset_marker_colr_ind
gset_marker_size
gset_marker_type
gset_seg_tran
gset_text_align
gset_text_colr_ind
gset_text_font_prec
gset_text_path
gset_vp
gset_win
gtext
gupd_ws
slay, that's all 70 of them, no skips, no cuts π
please see the man page for any of these for more information on that particular function. and in the future, as higher level GKS Fortran functions are implemented, there may be C-bindings created for them as well. stay tuned bestie π
now, important: since the NCAR Graphics GKS C-binding adheres to the standard, the names for the C-bindings are not like the Fortran names. instead, the function names are more descriptive β like gset_fill_colr_ind, which corresponds to the Fortran GKS routine GSFACI. iconic naming glow-up tbh β¨
if you know the name of the Fortran GKS routine and you need the C-binding name, you can look at the man page for the Fortran routine to get the name of the C-binding routine. problem solved, you're welcome π
πΈ ARGUMENT LISTS πΈ
the argument list of each GKS C-binding closely corresponds with the argument list of the Fortran routine, but in many cases, the arguments are represented in the form of a C structure. those structures are defined in the include file <ncarg/gks.h>. keep that file close, it's your bestie fr fr.
π¦ FUNCTION PROTOTYPES π¦
the GKS C-bindings are intended to be ANSI C compliant. to get the correct function prototypes, include <ncarg/gks.h> in your C program. that's the whole tip. do it. π
π COMPILING YOUR PROGRAM π
to compile your NCAR Graphics C program with the GKS C-bindings, use the application ncargcc. ncargcc will take care of loading in the necessary C/Fortran interface libraries as well as the NCAR Graphics C and Fortran libraries. it's literally doing the most so you don't have to π
you will either need to set the NCARG_ROOT or the NCARG_BIN, NCARG_LIB, and NCARG_INCLUDE environment variables in order to run ncargcc. see man ncargintro for more information.
if you do not wish to use ncargcc, then you can just run it with no arguments to see what the necessary libraries are, and then put this in your Makefile or whatever else you are using to compile your program. DIY queen energy, we respect it π«Ά
β EXAMPLES β
an example of a C program that calls some of the NCAR Graphics GKS C-bindings has been provided. to copy this C program into your directory, and then compile, link, and run it, type:
ncargex c_gtxpac
go off, run it, main character behavior π
π SEE ALSO π
- Online:
ncarg_cbind(3NCARG),ncargex(1NCARG),ncargintro(5NCARG). - Hardcopy: NCAR Graphics Fundamentals, UNIX Version User's Guide for NCAR GKS-0A Graphics
π COPYRIGHT π
Copyright (C) 1987-2002 University Corporation for Atmospheric Research
the use of this Software is governed by a License Agreement.
okay that's the whole page bestie, you're officially GKS C-binding literate. obsessed with you. mwah π π
signing off from NCAR, February 1993 β page NCARG_GKS_CBIND(3NCARG) πβ¨
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms