Path: utzoo!attcan!uunet!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Colormaps (was ...and Visuals) Message-ID: <8909221230.AA22089@expire.lcs.mit.edu> Date: 22 Sep 89 12:30:12 GMT References: <3853@helios.ee.lbl.gov> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 10 Sorry, XAllocColorPlanes will allocate contiguous PLANES, not cells. Correct, as does XAllocColorCells. If you want to contiguous entries, you can round up to a power of 2^N, and use XAllocColorCells with npixels = 1 and nplanes = N and contig = True, you can treat the resulting values as "contiguous", subject to shift and an add (take the numbers 0 through 2^N-1, shift them up to the planemask, then add the base pixel). If you didn't want a power of 2, you can free the extras. This is not optimal, but it can be done.