next up previous contents index
Next: Device Up: Interactive Classes and Devices Previous: Utility Functions

Graphic Devices

 

It is intended to develop the graphic environment GRAPE independent of any hardware requirements. To accomplish this aim the class GraphicDevice is introduced. Its instances provide primitive functions for graphic output.

           

GRAPE(dev, "set-stddev")()
(GRAPHICDEVICE *) GRAPE(GraphicDevice, "get-stddev")()
(GRAPHICDEVICE *) GRAPE(special-dev-class, "new-instance") (name)
GRAPHICDEVICE *dev
CLASS *GraphicDevice, *special-dev-class
char *name

Graphic output is always sent to the actual device (or stddev). On class GraphicDevice a method "get-stddev" is defined which returns a pointer on the actual standard device (stddev). On the other hand a subclass' instance of GraphicDevice can be made to the standard device by sending the method "set-stddev". Since no device is explicitly set the graphic output is sent to a default device depending on the user's machine and terminal.

The method "new-instance" creates a new instance of the available subclasses. The only parameter defines its name. The function pointers are described later. This method does not change the actual graphic device. The actual graphic device is set by "set-stddev", e.g.:

   GRAPHICGT *dev;

   dev = GRAPE(GraphicGt, "new-instance")("graphic-out");
   GRAPE(dev, "set-stddev")();





SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.