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

Home » Public Forums » archive » Color Questions
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 Questions [message #19690] Thu, 13 April 2000 00:00 Go to next message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

Is it my imagination, or has there not been a color
question for which "Device, Decomposed=0" is the answer
for months now? You don't suppose the word has finally
gotten out, do you? Wow.

I'm working on my web page today. I think I'm going
to change the question of the Week/Month/Year to
"How can I access main-level variables from within
my program?".

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
Re: color question [message #19798 is a reply to message #19690] Tue, 25 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:

> sometimes the widget changes the graphics device to 0.
> It was pure accident that's I found this.
>
> I don't find DEVICE,SET_GRAPHICS_FUNCTION=0 in the widget code.
>
> Which other reasons or programs are known to change the graphics
> function.

I've never known any program that changes the graphics function
and then leaves it there. At least none that are supplied in
the IDL distribution. :-)

I would be looking in one of the other user-written routines
used by this widget program if you can't find it in the
widget program code itself. This just reeks of programmer
error. :-)

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
Re: color question [message #19800 is a reply to message #19690] Tue, 25 April 2000 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:
>
> 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
>


Thanks David,


sometimes the widget changes the graphics device to 0.
It was pure accident that's I found this.

I don't find DEVICE,SET_GRAPHICS_FUNCTION=0 in the widget code.

Which other reasons or programs are known to change the graphics
function.


Reimar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Polar to spherical coordinates
Next Topic: Re: !x.region,!y.region

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

Current Time: Thu Dec 04 03:50:17 PST 2025

Total time taken to generate the page: 0.01217 seconds