Escape Functions


The GKS escape function provides a standard way of implementing nonstandard GKS features. The escape function call is shown below. An example of how to invoke GESC in the NCAR GKS package to create multiple metafiles in a single job is given in example pgkex21. For information on running GKS example codes, see Appendix A.
-------------------------------------------------------
           Argument | Type          | Mode  | Dimension
-------------------------------------------------------
CALL GESC  (FCTID,  | Integer       | Input |
            LIDR,   | Integer       | Input |
            IDR,    | Character *80 | Input |   LIDR
            MXODR,  | Integer       | Input |
            LODR,   | Integer       | Input |
            ODR)    | Character *80 | Input |   LODR
-------------------------------------------------------
FCTID
A function identifier.
LIDR
Dimension of the IDR input data record array.
IDR
Input data record.
MXODR
Maximum length of the ODR output data record array.
LODR
Dimension of the ODR output data record array.
ODR
Output data record.
Errors:
8, 180
--------------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void gescape(
    Gint                   func_id,      /*  function identifier      */
    const Gescape_in_data  *in_data,     /*  input data record        */
    Gstore                 *store_data,  /*  storage for output data  */
    Gescape_out_data       **out_data    /*  output data record       */
);

--------------------------------------------------------------------------
Distributed with NCAR graphics is a set of user entries that will perform the setting of the escape data records and call the GKS escape function. An escape function relevant to NCAR GKS has meaning only in NCAR GKS, and not in any other GKS packages. You should use the entries NGSETI, NGSETR, or NGSETC to make your escape calls. See the man pages for those utilities (which exist only in Version 4.0 or later). See also the man page for ngmisc_params which describes all of the available parameters. Here is a summary of the escape functions that exist in NCAR GKS:

Table 1: Summary of escapes in NCAR GKS

---------------------------------------------------------------------------
      |                                                |           | ngmisc
  #   |             Description                        |   Notes   | param.
---------------------------------------------------------------------------
-1386 | Flag whether clipping rectangles in segments   |           | IC  
      | are transformed by the segment transformation  |           |
-1387 | Temporarily close an NCGM.                     | ncgm only | none
-1388 | Set/save/restore primitive attribute settings  |           | none
-1389 | Reopen an NCGM for appending.                  | ncgm only | none
-1390 | Returns 'NCAR_GKS0A--VERSION_4.0' in ODR       |           | none
-1391 | File name to be used for the next opened file  |           | ME
      | (using GOPWK) of category MO.                  |           |
-1393 | Picture name for the next picture. To name the | ncgm only | PI
      | first picture, call this escape before opening |           |
      | the workstation.                               |           |
-1394 | Sentinal characters for creating segment names.|           | SE
-1397 | Flags whether segments will be deleted when    |           | SS
      | WISS is closed. Default is to delete them.     |           |
-1398 | Specify maximum number of GKS error messages   |           | ER
      | to issue before aborting. Default is ten.      |           |
-1399 | Flag to indicate if clipping to the NDC        |           | CL
      | viewport is on. The default is yes (incurring  |           |
      | about an 8% overhead.                          |           |
-1400 | Specifies the error allowed in matching the    | X11 only  | PE
      | requested colors, expressed as a percentage.   |           |
      | Default is 10.                                 |           |
-1401 | Tells the X driver to specify its own color    | Obsolete  | PR
      | map rather than sharing with other windows.    |           |
      | This is identical to specifying 1 for the      |           |
      | color model with escape -1402.                 |           |
-1402 | Tells the X driver which color model to use.   | X11 only  | SC,MC,
      | First integer is the workstation id. If -1 is  |           | PC
      | used, the escape will apply to the next        |           |
      | workstation created.  The second integer       |           |
      | specifies the color model to use:              |           |
      | 0 = shared X colormap                          |           |
      | 1 = private X colormap                         |           |
      | 2 = mixed model-use shared as long as possible |           |
-1512 | Specify spacing between software fill lines.   | PS only   | FI
-1513 | Specify spacing between hatch pattern lines.   | PS only   | HA
-1514 | Maximum size of the operand stack.             | PS only   | ST
-1515 | Maximum number of points in a path.            | PS only   | PA
-1516 | Scale factor for nominal linewidth.            | PS only   | NO
-1517 | Specifies whether background color will        | PS only   | FU
      | fill the entire page or just the viewport.     |           |
      | Default is viewport.                           |           |
-1518 | Specify type of line join. Default is "round". | PS only   | JO
-1519 | Specify type of line cap. Default is "round".  | PS only   | CA
-1520 | Specify miter limit of line joins. Default     | PS only   | MI
      | Default is 10.                                 |           |
-1521 | Coordinate points for positioning output.      | PS only   | LX,LY,
      | Default is largest square on output device.    |           | UX,UY
-1522 | Scale factor for representing coordinates.     | PS only   | CO
-1523 | Flag for selecting RGB or CMYK color model.    | PS only   | CO
---------------------------------------------------------------------------

for details on escape functions that apply specifically to X output workstations, see X11 escapes.

For details on escape functions that apply specifically to PostScript output workstations, see PostScript escapes.

If you invoke an escape function that applies to a specific workstation type, it will have no affect on any of the other workstation types.


Links: GKS Index, GKS Home