next up previous contents index
Next: GRCONV and the Up: GKS Metafiles Previous: Shipping Metafiles

GRVIEW and the Interpretation of Metafiles

To use the graphical information stored in the metafile it must be interpreted so that the original picture can be re-created on whatever device the application requests. GKS provides three functions in order to interpret metafiles, and these may be called by applications which require to manipulate the contents of a metafile explicitly:

GGTITM
get item from metafile
GRDITM
read item from metafile
GIITM
interpret item from metafile

In order to view a GKS metafile on a terminal a program is available called GRVIEW. This is an interactive program which allows the user to view and/or edit the pictures (frames) in one or more metafiles. The pictures may be viewed sequentially, or it is possible to skip frames to get to a particular picture. If the frames have been named using the GCNAME function, then it is possible to search for pictures by name, and also to make a directory list of all pictures on the metafile.

After viewing a picture the user has the possibility to write it out onto a GKS metafile, or in various other formats, including PostScript and Tektronix 4014 escape codes. This allows sub-sets of the pictures on the original file to be produced. There is also a feature provided which allows the position and scale of the Workstation Viewport to be re-set. Thus, the size of the output picture can be changed to suit better a particular device.

Without being quite so sophisticated, GRVIEW attempts to provide the sort of capabilities available on commercial products such as MACDRAW, except that GRVIEW runs on VAX, APOLLO, and IBM computers with any GKS supported terminal. Having said this, it should be clear that the 'user friendliness' of an editor is much greater on a colour APOLLO or VAX workstation, or on a Tektronix 4207, than on a machine with only the capabilities of a Tektronix 4014.

GRVIEW operates in one of three modes, which are selected on the command line:

  1. VIEWING mode is the default. In this case GRVIEW is used to allow the pictures on the metafile to be displayed on a graphics terminal. In this pure viewing mode GRVIEW does not make use of any internal picture storage and so will run more efficiently.
  2. COPY mode also allows the input metafile to be displayed, but in addition frames may be selected for copying onto an output file. This may be another metafile, a PostScript file, or a file containing Tektronix 4014 escape sequences. In copy mode the contents of each picture may not be changed, but each picture may be named (if it is not already), scaled in size, and several pictures may be packed onto a single page.
  3. EDIT mode allows the pictures on an input metafile to be edited, or for a completely new picture to be generated from scratch.

Depending on the system in use, GRVIEW allows parameters to be provided on the command line, or via an interactive dialogue. The program also prompts the user to provide any missing information. The user now HAS to define which terminal type is being used because the diversity of incompatible terminals available does not permit a useful default to be chosen. There are also features which warn the user if too many GKS errors have been produced (to avoid filling up the user's file space with messages), and which allow VM/CMS users to regain control after a pre-set number of graphics operations as VM has no simple interrupt facility.

More details of how GRVIEW operates may be found in reference [9], or by typing HELP GRVIEW or FIND GRVIEW.


next up previous contents index
Next: GRCONV and the Up: GKS Metafiles Previous: Shipping Metafiles


Janne Saarela
Mon Apr 3 17:00:12 METDST 1995