[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Number of colors of widget appliation

[Note: This follow-up was e-mailed to the cited author.]

Carsten Dominik (dominik@astro.uva.nl) writes:

> I am develloping a widget application with IDL.  The widget contains a 
> couple of draw windows.  One displays an image I read from a jpg file, 
> the other display graphic objectes.

Oh, dear. Quite a lot could be going on here, Carsten. :-(

Could you answer a few questions for me? It will help
sort this out.

1. What version of IDL and on what computer?

2. If you start IDL up from scratch and type these commands, 
   how many colors do you have?

   % idl
   IDL> Window
   IDL> Print, !D.N_Colors

   In fact, send the results of a HELP, /Device after the
   Window command, too.

3. Are you using direct graphics or object graphics?

4. How many colors does your display support? 

5. When you say that the COLORS keyword on the draw
   widget didn't work, do you mean that you opened the
   draw widget window as the very *first* graphics 
   window in that IDL session?

6. Is your JPEG image a color image? In other words,
   is that image a 24-bit image?

7. When you write this:

   "So how can I make the main window of a widget allocate 
    its own color table and share it with all child objects 
    in that widget?"

   Do you mean you want the widget application to have a 
   completely separate color table from all other programs?
   Do you have the hardware to support this? In other words,
   you have something other than an 8-bit display? Or do you
   mean you just want the widget's correct colors when you
   are mucking about with the widget?

8. How are you going about loading the "colors" for the 
   widget program?

Sorry for so many questions, but color can be just a
wee bit complicated, as I think you are discovering. :-)



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155