GKS 0A Output Primitives


At the heart of GKS are the Output Primitives. These are the GKS functions that actually produce viewable results, like drawing lines, drawing text, and so forth. Each output primitive has an associated set of attributes, such as linewidth and line color for lines. The programming technique is to set values for the output primitives and then call a basic function that will draw the desired primitive using the current settings for the attributes.

GKS difines five output primitives:

  1. polyline - for drawing contiguous line segments.
  2. polymarker - for marking coordinate positions with various symmetric text symbols.
  3. text - for plotting text at various angles and sizes.
  4. fill area - for plotting polygonal areas with solid or hatch fill.
  5. cell array - for plotting portable raster images.
The documentation modules mentioned above discuss the primitives and the most common functions for setting their attributes. Also discussed are inquiry functions that exist for retrieving current settings of attribute values.

Topics of interest related to the output primitives are:

  1. segmentation - saving plot instructions for later use in the same application.
  2. aspect source flags - a different way of specifying attribute values.
  3. escape functions - functionality unique to NCAR GKS using the GKS "standard way of being non-standard".