Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Colors and image routines problems Message-ID: <2708@gazette.bcm.tmc.edu> Date: 9 Nov 90 22:27:51 GMT References: <9001@mirsa.inria.fr> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Organization: Baylor College of Medicine, Houston, Tx Lines: 18 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu In article <9001@mirsa.inria.fr>, mangin@debussy.inria.fr (Frank Mangin) writes: |> 1) On a sun 4/60, 8-bits color display, SunOS4, running MIT X11R4 server, under twmR4: |> I create a window with a DirectColor visual, and an appropriate colormap (XCreateColormap with AllocAll argument). I enter the window (the colormap gets installed), store colors in the colormap using XStoreColors, and the changes are NOT "immediately v|> isible" (Xlib doc). Now if I leave and reenter the window, the changes are visible. I can't say if this is a twm or an XLib bug. It is not possible in HARDWARE for the changes not to be immediately visible. Are you issuing an XFlush Call after XStoreColors? |> |> - Can I use XAllocColor with a static colormap? If yes, this doesn't work for the Xsun server from comp.sources.x (the pixel value returned is always 0). If not, how can I know which pixel value will give a given rgb color? XAllocColor should ALWAYS work for any colormap. Are you checking the return value? I am not too familiar with Static Color displays, but I would imagine that if the color you asked for was not there, XAllocColor would fail (I believe that StaticColor colormap is READ ONLY). -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776