[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Number of colors of widget appliation
Craig Markwardt wrote:
> Carsten Dominik <firstname.lastname@example.org> writes:
> > IDL> window, colors=200
> > IDL> launch_my_appl.
> > What happens is this: The "window" call indeed allocates a large
> > number of colors. The widget application seems to use many colors as
> > well, but it dissplays them with the shares color map - totally
> > wrong. THis is independant of where my cursor is - on the widget or
> > somewhere else.
> > Now, when I move the cursor to the window I opened with "window, colors=200",
> > the draw window in the widget shows the correct colors, but the rest
> > of the widget is wrong.
> Yes, yes, yes! I described this problem a few weeks ago. My
> conclusion is that draw widgets do not update their color tables like
> normal draw windows. This is true for me on Solaris and Linux
> platforms, IDL 4 through 5.2.1, 8 bit color. While color flashing is
> annoying, at least it flashes to the *right* colors on a normal draw
> window. Not so for draw widgets.
I see the same behavior when running IDL 5.1 on an SGI, using a Windows
NT PC in 256 color mode with XWin-32 as the display terminal.
Whenever you create windows with a specific number of colors in 8-bit
display mode, you are asking for 'color flashing' to occur. Personally,
I never want to see color flashing when I'm running IDL. Here are some
tips for avoiding color flashing altogether.
(1) Close all existing IDL sessions, and any other applications you have
running on your desktop (especially web browsers).
(2) Start a new IDL session, and type
window, /free, colors=-10 ; (note *minus* 10)
This tells IDL to try and obtain a shared colormap, while reserving 10
colors for use by the desktop. Note that the color table size is
determined when you open the first graphics window in an IDL session,
and it remains fixed for the remainder of the session.
(3) Check the number of colors you have available by typing
(4) Check the display properties by typing
Look for the line that says 'Colormap:'
If the number of colors is 100 or higher, and IDL obtained a shared
colormap, then you have an acceptable number of colors available and
color flashing should not occur. The trick is to write your code to use
the system variable !d.table_size to tell you the size of the color
table: don't assume any particular size.
If the number of colors reported is less than 100, or IDL obtained a
private colormap, then your desktop is not allowing IDL to use enough
colors. Solaris boxes running the CDE desktop and Linux boxes running
the GNOME desktop in 8-bit display mode are particularly troublesome in
this respect. Under Solaris, you can modify the CDE color preferences to
tell it to allow 'Most colors for applications', log out, and log back
in. If you are running GNOME on Linux, I have not found a way to make it
use less colors. The only solution I know of is to use a different
window manager, such as fvwm.
Liam E. Gumley
Space Science and Engineering Center, UW-Madison