| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 803 |
|
To support a new output device for AIPS++ display applications or tools, it will be necessary to implement a new PixelCanvas and PixelCanvasColorTable pair. At the time of writing, two major PixelCanvas implementations exist: the X11PixelCanvas for display to X Windows devices, and the PSPixelCanvas for hardcopy output using PostScript. A slightly specialised version of the X11PixelCanvas -- TclTkPixelCanvas/GTkPixelCanvas -- exists to facilitate the implementation of the Display Library interface in gDisplay.so. New PixelCanvases are envisaged for OpenGL and Java devices in the future, but are not yet included in planning documents.
Development of a new PixelCanvas should begin with the design of a PixelCanvasColorTable which manages color allocation strategies on the new device. The PixelCanvasColorTable class is quite sophisticated, but should be adaptable to most display device allocation schemes in the near future. The most important facilities of the PixelCanvasColorTable to implement for new devices are the capability to dynamically resize the entire ColorTable itself, and to dynamically extend and reduce the color usage of the various Colormaps registered on the ColorTable. Of high importance also is the facility to provide multichannel visuals even on devices whose intrinsic software or hardware does not provide such. For example, the X11PCColorTable provides HSV and RGB facilities even for native X PseudoColor visuals.
With the PixelCanvasColorTable in hand for the new device, attention can turn to the PixelCanvas itself. From the outset, a decision should be made on whether a display list caching facility will be provided. This is highly recommended for interactive devices, such as OpenGL, but is seen as less important for non-interactive devices, such as the existing PSPixelCanvas which has no great need to offer caching services. For interactive devices, code to turn native events (such as mouse movement and key presses) into PC{Motion,Position}Event objects as appropriate must be implemented, and finally the graphics primitives must be implemented to a high level of quality and trustworthiness. Ultimately, it is the intention to provide full test wrappers for all classes in the Display Library, and PixelCanvases being one of the fundamental classes should receive such attention early on in the development process.