NGSRAT(3NCARG) | NCAR GRAPHICS | NGSRAT(3NCARG) |
NGSRAT - save/restore/set NCAR GKS primitive attribute values in toto.
CALL NGSRAT(IOPT, IAT, RAT)
#include <ncarg/ncargC.h>
void c_ngsrat(int iopt, int *iat, float *rat)
IAT contains integer GKS attribute settings as per:
If you want to save the state of the NCAR GKS primitive attribute settings, call NGSRAT with a first argument of 0. When the first argument is 0, the IAT and RAT arrays (second and third arguments) are ignored and the state values are stored internally to NGSRAT.
To restore the NCAR GKS primitive attribute values to what they were as of the last time NGSRAT was called with argument IOPT = 0, then call NGSRAT with first argument of 1. IAT and RAT are ignored in this case.
If you call NGSRAT with a fist argument of 2, then the current settings of the NCAR GKS primitive attribute values are returned in arrays IAT and RAT as per the description of IAT and RAT above.
If you call NGSRAT with a fist argument of 3, then arrays IAT and RAT must be supplied and the values therein will be used to set the NCAR GKS primitive attribute values as per the description of IAT and RAT above.
A common use of NGSRAT would be in conjunction with NGMFTC and NGREOP for saving the GKS state after writing to one metafile, writing to a new metafile, and then restoring the GKS state when reopening the initial metafile.
The following sequence:
CALL NGSRAT(0,IAT,RAT)
... do some setting and drawing
CALL NGSRAT(1,IAT,RAT)
would save the values of all NCAR GKS primitive attributes before the code that does setting and drawing and then restore the attribute values after the setting and drawing.
Use the ncargex command to see the following relevant example: pgkex27.
To use NGSRAT or c_ngsrat, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
NGSRAT issues no messages apart from potential illegal setting of the attribute values when IOPT = 3.
Online: ngmftc(3NCARG), ngreop(3NCARG),
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.
October 1996 | UNIX |