Next: Computer Graphics Metafiles
Up: Introduction
Previous: What is GKS
In some respects GKS is a major departure from earlier software
interfaces to graphics display systems, and several new concepts have
been introduced. The following is a brief list of the new features,
which will be more fully described within the body of the document.
- GKS has no concept of a current point. This idea dates
from when most graphics devices were pen plotters, in which case the
current point corresponded clearly to the position of the pen.
However, it would be less obvious where one would define the current
point when drawing a filled polygon on a raster display.
Thus, all GKS primitives which require
a starting point specify that point in the function call.
- In most cases earlier software interfaces could only control a single
device at a time, and if some means was provided to 'capture' the graphics
output for storage, then this was handled in a special way.
GKS simplifies this situation considerably by defining
Workstations, which correspond to 'virtual devices'.
GKS maps each workstation onto a real piece of hardware, but to the
application programmer they are all handled in the same way, and
several workstations can be active simultaneously.
There is a workstation which writes the output it receives onto a
Metafile for storage and/or transmission over a network
and this, also, is handled just like any other workstation.
- GKS incorporates the concept of a Logical Device to
control input. There are six classes of Logical Input Devices, and these
are mapped onto the actual physical devices in use, without the application
programmer having to write special code if, for example, (s)he is using
a mouse instead of a tablet. This helps to make application code much
more portable. The following logical devices are of particular interest:
- The Logical Locator Device, which returns the locator position
in the user's coordinate system, not that of the physical device.
- The Logical Pick Device, which tells the application
at which object the user is pointing, without having to provide the code to
work it out.
- The Logical Choice Device, which allows the user to
choose one option out of a set.
- GKS provides a mechanism to group the graphics output commands into
Segments, where they may be stored for later use.
Thus, an image stored in a segment could be made invisible and then visible
again without the application having to re-draw it.
Information sent to a workstation to produce an image which is not
stored is called non-retained data.
- Finally, GKS provides a whole host of functions allowing the application
to inquire at run-time the state and/or capabilities of a
workstation or the implementation of GKS itself.
This is a very important feature for allowing code to be written in a
portable way, and still to make the best possible use of the environment in
which it is running.
Next: Computer Graphics Metafiles
Up: Introduction
Previous: What is GKS
Janne Saarela
Mon Apr 3 17:00:12 METDST 1995