oerder@sun4 (Martin Oerder A ) (05/25/90)
We plan to use the Eiffel graphics library for the graphics output of our application. We find the graphics library well organized and suited for out problem *but* only as long as we need only X output. We need, however, (in addition to X) Postscript output and possibly others in the future. Since the concept of 'world' and 'figures' applies also to the Postscript output, the first idea of course is to replace the "device driver" parts of the library. This, however, is not possible, because the 'figure' classes *inherit* from the driver (implementation) classes. At the moment, we consider three possible solution a) add to 'world' and 'figure' a routine 'print' (similar to 'display') which does the Postscript output. Write new 'figure_imp_ps' classes where the print routines are actually defined. Write a class 'page' which does for Postscript what 'window' does for X. Drawback: - change to library - for every new device we must again add routines b) write a central "driver" class with heirs 'X-driver' and 'PS-driver' etc. An instance of this class could then dynamically be attached to 'world'. Drawback: - change to library - no good oo design. 'driver' must contain 'display_circle', display_polyline etc. (It seems not possible to apply the polymorphism technique simultaneously to the orthogonal concepts of figures and devices.) c) use the complete Eiffel graphics library for the X output only. Write a similar package for Postscript. Write a 'super_world' class and dispatch from there to X or PS. Drawback: - much duplicated work We favor solution a) at the moment. Any comments, suggestions, help? A hint from ISE about the future development of the graphics library? Martin Oerder, Aachen University of Technology, oerder@ert.rwth-aachen.de