comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Shared maps and free colors, window positio

Re: Shared maps and free colors, window positio
type: item
description: In article 2mpm1gINNli1@maz4.sma.ch, gga@otl.sma.ch (Gianmario Galli) writes: > idlusers-news-gateway: > > > I am using idl on a SUN SPARCstation 2 with 8bit color graphics. > I am running idl V3.1.1 under X using the server X11.0, X11/NeWS. > > My questions: > > a) How can I get the current number of free colors (to be used in a shared > color map) before activating the first window? We have tried a lot of things to solve color flashing problems on using different applications together which preserves colors cells. Especially the Framemaker Openwinwindows Version 3.1 has an annoying bug. If the colors cells 116 - 256 are not yet preserved by another application FM 3.1 ( only the Openwindows Version! ) preserves them and they are never freed -even after exiting FM - until you restart Openwindows ( The change to MOTIF will solve this anyway ...). There is a nice tool on the net 'Colormap.c' ( X contrib ) which shows whats exactly happen in the color management by the window manager. We couldn't solve this special problem from within IDL neither using the Xresources ( Idl.colors: -10 or fixed value etc. ) nor the IDL !.d.n_colors or !d.table_size variables. Finally I extracted and modified a part of the mentioned colormap code to get a utility which returns the really free number of colors which can be used by an idl application without color flashing. This it is possible at least to inform the user if there are not enough colors available. I've included it below as a shar archive. From inside idl it can be used this way: IDL> spawn, ['get_nfre'], free_clrs, /NOSHELL IDL> print, free_clrs 246 .. I'm wondering how other users solve this problem, suggestions are welcome! Thomas #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # Makefile # get_nfre.c # This archive created: Fri Mar 25 07:43:13 1994 export PATH; PATH=/bi…
creator: idl
date: 1994-03-25T07:17:35-00:00