Aspect Source Flags (ASFs)


GKS allows for two methods of specifying attributes for output primitives. One way, which is the way that has been discussed exclusively in this guide, is to specify the attributes individually. Using this method, if you want to change the width of a polyline, then you would call GSLWSC to specify the desired width, and this setting would be in effect until GSLWSC was called again.

The other method of specifying attributes for output primitives is called "bundled". Using this method, the attributes are contained in "bundle tables". These tables contain settings for all of the attributes associated with a given output primitive. For example, there can be one or more bundle tables for polylines each of which contains settings for linetype, linewidth scale factor, and polyline color index. Using the bundled attribute setting scheme you set a value for the number of the bundle table that should be used to find the desired setting for the attributes.

Clearly the individual attribute setting scheme and the bundled attribute setting scheme cannot both be in effect simultaneously. GKS supplies a means by which you can specify whether a given attribute should come from its individual setting, or from a bundle table. Associated with each output primitive attribute is an "aspect source flag." The legal values for these flags are "1" for "individual" and "0" for "bundled." Each time GKS draws an output primitive, it first looks at the setting of the aspect source flag for the appropriate attributes, and then either uses the individual setting if the aspect source flag value is "1" or the setting from a specified bundle table if the setting is "0".

All default settings for output primitive attribute aspect source flags are "individual" in NCAR GKS. In higher levels of GKS it is possible for you to define your own bundle tables and select them, but at level 0A, this is not allowed. As implemented, using bundle tables in NCAR GKS is of no value and trying to use them is not advised. The only reason that aspect source flags are discussed here is because the default environment in some GKS packages is "bundled" rather than "individual." In the case that you run NCAR Graphics on top of a non-NCAR GKS package, you will want to check on the default setting for aspect source flags, and if it is "bundled", then you should initialize all the flags to "individual" by using the subroutine GSASF described below. If you do not have access to the necessary GKS documentation, then you can use the subroutine GQASF, described below, to determine the values of the aspect source flags and then, if they are bundled, set them to individual by calling GSASF.

Set Aspect Source Flags

--------------------------------------------------
            Argument | Type    |  Mode | Dimension
--------------------------------------------------
CALL GSASF  (LASF)   | Integer | Input |   13
--------------------------------------------------
LASF
List of aspect source flags. A value of 0 means bundled and a value of 1 means individual. The ordering of the flags in LASF is:
1 - linetype ASF
2 - linewidth scale factor ASF
3 - polyline color index ASF
4 - marker type ASF
5 - marker size scale factor ASF
6 - polymarker color index ASF
7 - text font and precision ASF
8 - character expansion factor ASF
9 - character spacing ASF
10 - text color index ASF
11 - fill area interior style ASF
12 - fill area style index ASF
13 - fill area color index ASF
Defaults:
In NCAR GKS all values of LASF are initialized to 1. Other GKS packages may initialize these values to 0.
Errors:
8
-------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void gset_asfs(
               const Gasfs  *list_asf  /*  list of asfs  */
);
-------------------------------------------------------------------

Inquire Aspect Source Flags

---------------------------------------------------
            Argument | Type    | Mode   | Dimension
---------------------------------------------------
CALL GQASF  (ERRIND, | Integer | Output |
            LASF)    | Integer | Output |  13
---------------------------------------------------
ERRIND
Error flag. Gives an integer error number from the errors list in in Appendix D, or a 0 if no error occurred.
LASF
List of aspect source flags. A value of 0 means bundled and a value of 1 means individual. The ordering of the flags in LASF is:
1 - linetype ASF
2 - linewidth scale factor ASF
3 - polyline color index ASF
4 - marker type ASF
5 - marker size scale factor ASF
6 - polymarker color index ASF
7 - text font and precision ASF
8 - character expansion factor ASF
9 - character spacing ASF
10 - text color index ASF
11 - fill area interior style ASF
12 - fill area style index ASF
13 - fill area color index ASF
Defaults:
In NCAR GKS all values of LASF are initialized to 1. Other GKS packages may initialize these values to 0.
Errors:
8
--------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void ginq_asfs(
               Gint   *err_ind,  /*  error indicator      */
               Gasfs  *list_asf  /*  aspect source flags  */
);
--------------------------------------------------------------------


Links: GKS Index, GKS Home