[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FLASH - Colors Update



David Fanning wrote:
> Speaking of having your cake and eating it too,
> I just learned what may be the secret for having
> 24-bit color AND having the colors in your IDL
> graphics windows automatically updated when you
> change color tables.
> 
> This will work ONLY for those machines (e.g., UNIX)
> which support a DirectColor visual class. Set the
> BYPASS keyword on the DEVICE command to 0, like this:
> 
>    DEVICE, DIRECT_COLOR=24, BYPASS=0
> 
> I can't try this on my machines, but the person who
> passed this tip along to me was pretty sure it would
> work. Make sure you do this before you open any
> graphics windows in your IDL session.

I have an SGI PowerIndigo2 with GR3-Elan 24-bit graphics running Irix
6.5 and IDL 5.2. Here's what happened when I started a new IDL
command-line session without a startup file:

IDL> device, direct=24, bypass=0
IDL> window, /free
IDL> help, /device
Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
Current graphics device: X
    Server: X11.0, Silicon Graphics, Release 6300
    Display Depth, Size: 24 bits, (1280,1024)
    Visual Class: DirectColor (5)
    Bits Per RGB: 8
    Physical Color Map Entries (Used / Total): 256 / 256
    Colormap: Private, 16777216 colors.  Translation table: Bypassed
    Graphics pixels: Decomposed,        Dither Method: Ordered
    Write Mask: 16777215 (decimal) ffffff (hex)
    Graphics Function: 3 (copy)
    Current Font: <default>,    Current TrueType Font: <default>
    Default Backing Store: Req from Server.
    Window Status: ---------------------
    id  typ(    x,  y,   backing store)    id  typ(   x,   y,   backing
store)
    32: Win( 640, 512, Req from Server)
IDL> device, bypass=0
IDL> help, /device   
Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
Current graphics device: X
    Server: X11.0, Silicon Graphics, Release 6300
    Display Depth, Size: 24 bits, (1280,1024)
    Visual Class: DirectColor (5)
    Bits Per RGB: 8
    Physical Color Map Entries (Used / Total): 256 / 256
    Colormap: Private, 16777216 colors.  Translation table: Enabled
    Graphics pixels: Decomposed,        Dither Method: Ordered
    Write Mask: 16777215 (decimal) ffffff (hex)
    Graphics Function: 3 (copy)
    Current Font: <default>,    Current TrueType Font: <default>
    Default Backing Store: Req from Server.
    Window Status: ---------------------
    id  typ(    x,  y,   backing store)    id  typ(   x,   y,   backing
store)
    32: Win( 640, 512, Req from Server)
IDL> loadct, 13
IDL> tvscl, dist(256)
IDL> loadct, 1

Note that DEVICE, BYPASS=0 only takes effect after a window has been
created.

The graphics window exhibited the 'color-flashing' behavior I've always
seen in DirectColor mode. That is, the color palette of the entire
display 'flashed' to a different set of colors when the cursor entered
the graphics window.

After the TVSCL command, with the cursor positioned outside the graphics
window, I saw a grey-scale image. When I moved the cursor into the
graphics window, the colors inside the graphics window 'flashed' to the
rainbow color table, and the rest of my desktop flashed to an unpleasant
combination of green, red and blue colors. When I moved the cursor back
to the IDL command line window and executed the second LOADCT command,
the grey-scale image did not change. However when I moved the cursor
back to the graphics window, the image 'flashed' to the blue/white color
table. Unfortunately, so did the rest of my desktop.

So while DirectColor mode does allow immediate graphics update when the
color table is changed, it also exhibits a very annoying color-flashing
behavior (at least on my system).

Cheers,
Liam.

-- 
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley