Path: utzoo!attcan!uunet!husc6!uwvax!umn-d-ub!nic.MR.NET!gonzo.eta.com!ddickey From: ddickey@gonzo.eta.com (Dan A. Dickey) Newsgroups: comp.windows.x Subject: Colormap problems with R3 Message-ID: <835@nic.MR.NET> Date: 8 Nov 88 16:22:17 GMT Sender: news@nic.MR.NET Reply-To: ddickey@gonzo.eta.com (Dan A. Dickey) Organization: ETA Systems, Inc., St Paul, MN Lines: 41 Hello, I'm having some problems with changing the colormap in my program. Here is what I'm doing: XCreateColormap() XAllocColorCells() XStoreColors() XSetWindowColormap() XInstallColormap() XPutImage() At this point, when I get Colormap.UninstalledEvent, I call XInstallColormap() again. First problem is that uwm keeps removing my colormap. So I killed uwm on that screen. Q1: I'd rather have uwm around, anyway to tell it not to worry about the colormap, that I'll change it back when I'm done? Anyways, when uwm is around and creating havok for me, my window uses the default colormap when my mouse is NOT in my window, but just pointing at the root or somewhere else. When I move the mouse into my window, the whole window goes black. Or off. I can't tell which. Q2: Anyone know anything about this? At the moment, I suspect some problem with the GC used in my XPutImage() call. The image I'm putting is a ZPixmap, depth 8, etc, etc...a Sun cgfour. The GC foreground is 0, color "white". The background is 1, color "black". The particular color map I'm creating is an attempt to duplicate monochrome on the color screen, with the various pixels between 2-255 either white or black, according to some formula. The reason for this is that then it is very easy to map mandelbrot sets of 256 iterations to these various "colors". If you feel you can help me, please do so. If you need some more information to help you out, I'd be glad to give it to you. Mail to: ddickey@gonzo.eta.com -Dan A. Dickey BTW: XPutPixel() is EXTREMELY slow to call for images of any significant size (800 x 800), at least on Sun type hardware (Big-endian are they?) as the code in XImUtil.c swaps everything around all over the place ANY time it needs to do something. I've produced a new Set8Pixel() that takes the place of XPutPixel() for my "particular" application...it reduced my time of createing a 512 x 512 image from over 3 minutes to under 10 seconds. Best thing of all is, no assembly code. This is for REAL monochrome screens. Color is even simpler, in my "particular" application. Dan A. Dickey ddickey@gonzo.eta.com