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

Re: The Skinny on 24-Bit Color (Long)



Folks,

I wrote in a long article yesterday that I did not know
of any way to determine the current visual class or
depth of the visual class for the current IDL session.

It was pointed out to me this morning that there are 
two new keywords to the Device command that can help
on X, WIN, and MAC devices.

The keyword GET_VISUAL_NAME can get the name of the
visual. (This keyword is incorrectly indicated in the
on-line documentation as applying only to the X device.)
And the keyword GET_VISUAL_DEPTH can get the depth of
the current visual. (This keyword is not documented anywhere
as far as I can tell.)

   IDL> Device, Get_Visual_Name=thisName, Get_Visual_Depth=thisDepth
   IDL> Print, thisName, thisDepth
         PseudoColor           8

This will make it much easier to work with 24-bit color in IDL.

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/