Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hi, As part of my work I am looking into reducing the number of colours used by various applications. Because we are running a fair few IDL applications, this is now one of my main targets. My basic aim is this: To have all IDL applications running on a certain display to share the same set of 32 colours. I have been looking into ways of doing this and can think of two methods: 1. Save the IDL translation table to a file from one IDL application, and load the same translation table in another IDL application (There is an example in the IDL 4.01 Reference Manual Section 3-22 or IDL 5 online help "Keywords for the DEVICE Procedure R through T" under translation) To me this method has the problem that it is quite difficult to allow IDL applications running on different machines and displaying on the same display to share a colour map. It is probably possible via sockets, but this seems a bit clumsy. 2. Get each IDL application to search through the X colourmap, and search the colours they need. Any colours which can not be found in the X colourmap are added. Thus the first IDL application run would allocate somewhere up to 32 colours. Any futher applications run will be able to share those 32 colours. Appart from some interesting sharing issues, the problem I have with this method is that I can find no way in IDL to read the X colour map. Is there a way to read the X colour map, getting some or all of the following information for each entry within IDL, or does it have to be done in c? 1. RGB value 2. If there is an application using that entry at the moment. 3. Which application is using it. Has anybody come up with any other methods of sharing colours in IDL which work? Thanks for your help, Daniel. (dmlang@bom.gov.au)