[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: device,decomposed=0
- From: Nigel Wade <nmw(at)ion.le.ac.uk>
- Date: Tue, 09 Feb 1999 15:21:28 +0000
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Leicester, UK
- References: <36B9B42C.FA417459@fz-juelich.de> <36B9B51E.54BF13D9@fz-juelich.de> <MPG.email@example.com> <36BEF984.AC8CB729@fz-juelich.de> <MPG.firstname.lastname@example.org> <36BF252C.A08D50C4@fz-juelich.de> <MPG.email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:13597
David Fanning wrote:
> But, of course, what you *really* want to know is the
> type of color visual, the depth of the display, and
> whether color decomposition is turned on or off at this
> particular moment. All of this information is now available
> in IDL 5.2 via keywords to the DEVICE command. If everyone
> would just upgrade to IDL 5.2, we would have the color
> situation licked. :-)
I have not installed 5.2 yet but the only new keyword I can see in
the "What's New" guide is GET_DECOMPOSED, are there others?.
I'm presuming DEVICE still works in the same way and connects to the X
server if no connection is already open? IDL uses its default visual and
returns info on this - if the visual you ask for is not available IDL
silently choose another.
With X it is possible to determine what visuals are available, the
depths and all sorts of other information in exactly the same way that
xdpyinfo does. It can be done independently of the IDL graphics window,
so no connection is made by IDL to the X server. It's really just a
question of querying the X server and asking it what visuals it
What is required is to make this information available within IDL so you
can then decide what visual you want in a request to DEVICE.
What I have done is to develop a DLM which returns the list of matching
available visuals e.g. to find all the 8 bit visuals I can ask:
or to get the list of 24 bit TrueColor visuals:
and it will return an array of structures, one per matching visual
with the details of that visual - id, class, depth colormap_size etc.
So, you can tailor your code according to the visual, and use a
or PseudoColor visual if one is available, otherwise use a TrueColor
and a non-decomposed colour table, if that's how you want to use colour.
Of course, this only works for IDL 5.1 and above because that's when
were introduced, but the DSO can easily be used by LINKIMAGE (and it
without saying it requires X and UNIX).
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : firstname.lastname@example.org
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555