Workstation class resource descriptions

wkColorMap
Use this resource to set or retrieve the colormap for a Workstation object. To set this resource, use a two-dimensional array of type NhlTFloat, an array of color specification formats, or a pre-defined colormap name. If you retrieve this resource, it will be a two-dimensional array of type NhlTFloat.

For a two-dimensional array, the fastest varying dimension contains three elements that define (in order) the red, green, and blue components of a single color. Each component should be within the range 0.0 through 1.0 inclusive. If the red component of a color is specified with a negative number, then the color is considered to be a missing value, and that index of the colormap will default. In all other cases, an error message will be generated if values are outside the range of 0.0 through 1.0 inclusive.

For an array of color specification formats, each element must be enclosed in double quotes and be either an RGB triplet as described above, or a named color from the $NCARG_ROOT/lib/ncarg/database/rgb.txt file.

For a pre-defined colormap name, set the resource to one of the following pre-defined colormap names:

"default"
The "default" colormap contains 32 entries. The first two entries default as described above. Indexes 2 through 25 define a cyclic colormap. This is a colormap with a uniform distribution of colors, but each successive element is choosen to be as different as possible from the previous element. Indexes 26 through 31 define a grayscale cyclic colormap.
"cyclic"
The "cyclic" colormap contains eight entries. The first two entries default as described above. The remaining entries are red, green, blue, yellow, cyan, and magenta.
"gscyclic"
The "gscyclic" colormap is a Gray Scale (gs) version of the "cyclic" colormap. It also contains eight entries. The first two entries default as described above. The next six entries are different shades of gray, with each successive value chosen to contrast as much as possible with the previous entry.
"gsltod"
The "gsltod" colormap is a Gray Scale colormap, from Light TO Dark (ltod). It contains 33 entries. The background color is set to black. The foreground color is set to white. Each successive entry after that gets slightly darker until entry 32 which is nearly black.
"gsdtol"
The "gsdtol" colormap is a Gray Scale colormap, from Dark TO Light (dtol). It contains 33 entries, and is the inverse of the "gsltod" colormap.
"uniform"
The "uniform" colormap contains 175 entries. The first two entries default as described above. The remaining entries define a uniform colormap with red varying fastest, green next, and blue slowest. It starts with the maximium values for each (skipping white since it is either the foreground or the background), and then cycles through five levels of red, seven levels of green, and five levels of blue.
"temp1"
The "temp1" colormap contains 63 entries. The first two entries default as described above. The remaining entries vary from white to blue to green to red. This colormap may be useful for displaying plots with temperature-related information.
"psgcap"
The "psgcap" colormap contains 240 entries. It is based on the colormap that is used in the color PostScript graphcap for ctrans.

If you do not set wkColorMap, the Workstation object will use a default color map. The first triple of the wkColorMap array (index 1 of the slow-varying dimension using the Fortran interface, or index 0 using the C interface) is the background color for the Workstation and is accessed as HLU color index 0. In the default colormap, the color is dynamically determined based on the Workstation subclass. For example, the background color for the XWorkstation is black, but the background color for the PSWorkstation is white. The background color can also be set using the wkBackgroundColor resource as a convenience.

The second triple of the wkColorMap array (index 2 of the slow-varying dimension using the Fortran interface, or index 1 using the C interface) is the foreground color for the Workstation and is accessed as HLU color index 1. The foreground color is also dynamically determined. It defaults to either white or black, whichever is determined to contrast more with the background color.

Default: "default"

wkColorMapLen
This read-only resource allows you to determine the number of elements currently in the wkColorMap without retrieving the whole table. This is one more than the largest currently defined index.

Default: <dynamic>

wkBackgroundColor
This resource can be a one-dimensional array containing three elements of type NhlTFloat that specify (in order) the red, green, and blue components (an RGB triplet) of the Workstation background color, or a string containing a color name from the file $NCARG_ROOT/lib/ncarg/database/rgb.txt. You may set wkBackgroundColor only when the Workstation object is created. The background color is accessed for drawing purposes using HLU color index 0 (or the defined constant NhlBACKGROUND when using the C language interface). If defining this resource with an RGB triplet, each element must be in the range 0.0 through 1.0 inclusive. If any element is invalid, the Workstation object issues a warning, and reverts to the default background color value.

Default: (0.0, 0.0, 0.0) (Black)

wkForegroundColor
This resource can be a one-dimensional array containing three elements of type NhlTFloat that specify (in order) the red, green, and blue components (an RGB triplet) of the Workstation foreground color, or a string containing a color name from the file $NCARG_ROOT/lib/ncarg/database/rgb.txt. The foreground color is equivalent to HLU color index 1 (the defined constant NhlFOREGROUND when using the C language interface). It is the first element of the wkColorMap array (index 0 of the array when using the C interface). Unlike wkBackgroundColor, you may set wkForegroundColor at any time during the life of the Workstation object.

If you set wkForegroundColor and wkColorMap at the same time, the set value of the first element of wkColorMap will be replaced with the value of wkForegroundColor. If neither wkForegroundColor nor wkColorMap is set when the Workstation object is created, the foreground is determined dynamically.

Default: <dynamic>
If background color is determined to be closer to black than white, the foreground color is set to white (1.0, 1.0, 1.0); otherwise the foreground color is set to black (0.0, 0.0, 0.0).

wkDashTableLength
This read-only resource contains the number of currently available unique dash patterns.

Default: <dynamic>

wkFillTableLength
This read-only resource contains the number of currently available unique fill patterns.

Default: <dynamic>

wkMarkerTableLength
This read-only resource contains the number of currently available unique markers.

Default: <dynamic>

wkGksWorkId
This read-only resource contains the low-level GKS workstation identifier. It can be used to mix calls to the low-level NCAR Graphics library and the GKS library with the HLU library. The HLU library expects the GKS workstation to be in a deactivated state. Therefore, any set of low-level calls occurring between HLU library calls should be bracketed by a GKS activate workstation call and a GKS deactivate workstation call.

Default: <dynamic>
This value is determined by the low-level GKS library.

wkDefGraphicStyleId
This read-only resource contains the default GraphicStyle object that is created along with the Workstation itself. If you call an immediate mode graphics primitive function without specifying an explicit GraphicStyle object, the Workstation uses the default GraphicStyle object to determine the attributes used to render the graphics primitive. You may modify these attributes by retrieving the default GraphicStyle object, and then setting its resources as desired.

Default: <dynamic>


Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.19 $ $Date: 1999/03/11 20:13:06 $