Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aipdc From: aipdc@castle.ed.ac.uk (Paul Crowley) Newsgroups: comp.windows.x Subject: Does anyone have any working XGetRGBColormap code? Message-ID: <9138@castle.ed.ac.uk> Date: 13 Mar 91 21:05:12 GMT Organization: Put your analyst on danger money, baby! Lines: 22 I have code that needs the colourmap set up such that different colours are on different bitplanes, so when gc.function == GXor, and I plot something red over something blue, the resulting pixel will be magenta. I'm also trying to be sociable about it with regards to other programs. First, on what window should I be calling XGetRGBColourmaps? I'm using the root and getting nada. Secondly, what is it giving me back? Is it placing a pointer to an array of XStandardColormaps in whatever the third argument points to, and mallocing the space for the array? If so, do I need to free it? Thirdly, if the property does not exist, how should I go about creating it? This seems to me the toughie. It seems to me I have to search all the visuals for a suitable one (ie one of PseudoColor or DirectColor) set up a suitable colormap, and define the property. This seems like hassle, and if anyone has done it already, could they contact me? Thanks, ____ \/ o\ Paul Crowley aipdc@uk.ac.ed.castle \ / /\__/ Part straight. Part gay. All queer. \/