Path: utzoo!attcan!uunet!seismo!ukma!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: Colormaps (was ...and Visuals) Message-ID: <8909210815.AA26154@Larry.McRCIM.McGill.EDU> Date: 21 Sep 89 08:15:06 GMT Sender: news@bloom-beacon.MIT.EDU Organization: The Internet Lines: 31 >> Is there a call that returns the number of un-allocated color cells >> in a Colormap? > There is no protocol request for this. The theory is that you should > just allocate along in whatever map you prefer, and if you run out, > use CopyColormapAndFree to move stuff over to a new map. I had an application once where I wanted not the number of free cells in a colormap, but rather, a *contiguous* set of cells in a colormap. Is there any way to do this? XAllocColorCells bids fair to be what I want, but the documentation I have speaks of the `contig' parameter as follows: contig Specifies a Boolean value that indicates whether the planes must be contiguous. .... If contig is True and if all masks are ORed together, a sin- gle contiguous set of bits set to 1 will be formed for GrayScale or PseudoColor and three contiguous sets of bits set to 1 (one within each pixel subfield) for DirectColor. It says nothing about the returned pixel values. Do I have to just allocate and then, if I get non-contiguous pixel values, deal with the situation as best I can? Or is there some way (perhaps contig does this and my documentation is out of date)? (What I wound up doing was creating a new colormap for the purpose, which I therefore knew was completely free for me to play around in. Ugh.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu