Re: unexpected colors [message #20204 is a reply to message #20187] |
Mon, 22 May 2000 00:00   |
Ben Tupper
Messages: 186 Registered: August 1999
|
Senior Member |
|
|
David Fanning wrote:
>
> Here is your trouble, right here:
>
>> IDL> help,/device
>> Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
>> Current graphics device: X
>> Server: X11.0, Sun Microsystems, Inc., Release 3610
>> Display Depth, Size: 8 bits, (1152,900)
>> Visual Class: PseudoColor (3)
>
>> Any suggestions?
>
> Get a 24-bit display device. No, seriously. :-)
>
> It is impossible to avoid this kind of color problem
> when you combine direct and object graphics on an 8-bit
> display. The reason is that there is only one color table
> and direct and object graphics use it in two completely
> different (and incompatible) ways. As soon as you get
> things set up for your direct graphics window, the object
> graphics window loads its own color table, and the colors
> go bonkers. And since the object graphics window knows how
> to protect its own colors (better believe it!), it always
> changes the color table when it redraws itself, and visa
> versa.
>
Dang! Well, it's not the end of the world. I can always change the second
direct graphics drawing to object graphics.
I tried the code at home tonight on a 24 bit display. Sure enough, I'm back
to a dull but expected gray scale.
I didn't realize that the object graphics used the color lookup table when on
an 8 bit display system...
I had assumed that when I told the graphic axis object to be color [255,0,0]
that meant just that.
Of course, I hadn't really thought of it at all, which is why my code is
generally erorr fre.
Thanks for the info.
>
> I'm afraid it's back to the design table for you, Ben, my boy.
> Either that, or get the folks to cough up some cash for
> a new graphics card. Sell them on the numerous advantages.
> And point out that it's almost the end of the 20th century. :-)
>
>
Better the design table than the dog house!
Ben
--
Ben Tupper
Pemaquid River Company
248 Lower Round Pond Road
POB 106
Bristol, ME 04539
Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net
|
|
|