Re: problem with "xloadct" [message #27871] |
Mon, 12 November 2001 07:13  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Enrique Joven (eja@ll.iac.es) writes:
> I have an unapealling problem with the "xloadct" function in the
> SUN-environment. It works proporly in any machine, excepting the
> ULTRA-10 one, maybe because it uses 24-bit colors.
>
> The widget is properly initialized, and it seems to work,
> but it is not able to change the palette or the correction or
> whatever of the current image displayed.
>
> Anyone knows anything about this problem?
It is not a problem so much as it is the way
24-bit color displays work. You must re-display
your graphics after you change the colors in the
color table. There is no direct connection between
the colors in current graphics windows and the colors
currently loaded in the color table. This is exactly
why people *wanted* 24-bit color in the first place. :-)
Re-dislaying your graphics is not so hard. See
the UpdateCallback and UpdateCBData keywords to
XLoadCT, for example. Here is an article that
shows you how to update colors in a widget program:
http://www.dfanning.com/color_tips/noxloadct.html
My program XColors has even more flexible methods for
updating the colors in your programs:
http://www.dfanning.com/programs/xcolors.pro
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|