next up previous 200
Next: Interface to PGPLOT
Up: AGI Applications Graphics Interface Library
Previous: More

Interface to Graphics Systems

The AGI database is useful in two basic contexts. The first is to pass information between separate applications that may or may not be plotting on the device with the same graphics package. An example of two independent PGPLOT based applications has been given earlier while the use of the database file to allow native-PGPLOT based applications to interact with GKS-based applications is described here. For applications using the AGI GKS-based library a second use is to allow different graphics packages to interact within a single application, for example by using SGS to draw on top of an image displayed with IDI. These two packages have completely different models of the display device and AGI is used to mediate between them. The major restriction with this second mode of use is that the two graphics packages cannot both be open at the same time. There will be other restrictions depending on how the physical device characteristics are utilized by each graphics package; for example the size of the display area may be different in the different packages and this will cause problems if a picture defined by one package is beyond the limits of another.

The following simplified block diagram illustrates the recommended operation of AGI and two graphics packages within one application.

          OPEN AGI ( e.g. AGI_ASSOC )

             OPEN the first graphics package ( e.g. AGD_ACTIV )
             OPEN the device ( e.g. AGD_NWIND )
             plot with the first graphics package
             CLOSE the first graphics package ( e.g. AGD_DEACT )

             OPEN the second graphics package ( e.g. AGS_ACTIV )
             OPEN the device ( e.g. AGS_NZONE )
             plot with the second graphics package
             CLOSE the second graphics package ( e.g. AGS_DEACT )

          CLOSE AGI ( e.g. AGI_CANCL )


Subsections

next up previous 200
Next: Interface to PGPLOT
Up: AGI Applications Graphics Interface Library
Previous: More

AGI --- Applications Graphics Interface Library
Starlink User Note 48
Nicholas Eaton
Brian McIlwrath
30 January 2002
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council