Path: utzoo!attcan!uunet!cs.utexas.edu!usc!bloom-beacon!MYCROFT.MAYO.EDU!bmc From: bmc@MYCROFT.MAYO.EDU Newsgroups: comp.windows.x Subject: Stupid Colormap question. Message-ID: <8908252022.AA00226@mycroft.mayo.edu> Date: 25 Aug 89 20:22:50 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 31 I am at a lost as to why the following code does not product a gray scale colormap. It does produce a monotonic black colormap. back ground information: 1) Hardware : DECstation 3100 running ULTRIX 2.0 operating under DECwindows (color monitor = pseudocolor visual) 2) first_window is the parent window of my application 3) cmap is created with XCreateColormap (display, first_window, DefaultVisual (display, screen), AllocAll ) 4) color is an array DisplayCells in size, allocated with a malloc. the code: for (i = 0; i < DisplayCells(display, screen); i++) { color[i].flags = DoRed | DoBlue | DoGreen; color[i].pad = NULL; color[i].red = color[i].green = color[i].blue = (i << 8); color[i].pixel = i; } XStoreColors (display, cmap, color, DisplayCells(display, screen)); XSetWindowColormap (display, first_window, cmap); Thanks in advance for the help. ---------------------------------------------------- Bruce M. Cameron bmc@bru.mayo.edu Medical Sciences 1-14 (507) 284-3288 Mayo Foundation WD9CKW Rochester, MN 55905 ----------------------------------------------------