comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Color question (answer is not device,decomposed=0)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Color question (answer is not device,decomposed=0) [message #19811] Sun, 23 April 2000 00:00
Troy Carter is currently offline  Troy Carter
Messages: 5
Registered: April 2000
Junior Member
I am trying to learn to use Object graphics, now that idl 5.3 allows me
to create vector eps files using object methods. My problem is that
when I draw to a window, and try to get black on white, I end up with
black on yellow. White on black works fine, but when I try to set up my
IDLgrView object with color=[255,255,255], I get yellow instead of
white. The device procedure applies only to direct graphics, so
device,decomposed=0 is not the answer (although I tried it anyway :) ).
I am running idl on a solaris machine, using the 24-bit display of a PC
running linux. Any clues would be much appreciated. Thanks!

--
Troy Carter
tcarter@princeton.edu
Re: color question [message #19824 is a reply to message #19811] Thu, 20 April 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R.Bauer (R.Bauer@fz-juelich.de) writes:

> I have true_color mode and I have already set device,decomposed=0.
>
> If I start a widget sometimes the color table is destroyed and I have to
> start a new idl session to get my colors back.
>
> Any ideas are welcome.

Start a new IDL session!? I can't imagine anything
coming to that, *especially* on a 24-bit display.
Did you try re-loading your color table? That should
fix things, I soul think.

There are all kinds of ways color tables can be trashed.
For example, some other program can load one. :-)

Normally in widget programs we have to protect our
program's colors. This is usually done by setting up the
colors just the way you want them in the widget definition
module. Then getting the color vectors and storing them
in your info structure. Finally, you load the color vectors
at the same time you do a WSET to make sure you are drawing
into the correct window. (You ARE doing a WSET, aren't you?
You better be!) The code looks something like this:

WSet, info.windowIndexNo
TVLCT, info.r, info.g, info.b, info.start
... graphics commands here....

The other way you can protect colors is to write and
display colors in a DEVICE DECOMPOSED-INDEPENDENT fashion.
See my GetColor and TVImage programs, for example.

Cheers,

David

--
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Question about correlate.
Next Topic: Object Rubberband Selection Box

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:53:01 PDT 2025

Total time taken to generate the page: 3.90020 seconds