Creating Read/Write Color Cells

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Creating Read/Write Color Cells

Submitted by blawrence1 on Mon, 03/24/2003 - 22:10.

We have been trying to create read/write color cells for use as map overlays in one of our geographical data plotting applications. We have used several different approaches to accomplish this. Strangely, all of these worked on HP-UX. However, none of them were successful on Red-Hat Linux.

In the first approach, we attempted to allocate read/write color cells in the default color map using XAllocColorCells. The call to XAllocColorCells failed on Linux no matter how many or how few color cells we tried to create. From this we concluded that there was no room in the Default Colormap.

So, in another approach, we tried to create our own colormap using the command XCreateColormap. This appeared to be successful. However, when we tried to allocate colorcells in this map, XAllocColorCells once again failed (mind you it worked on HP-UX).

In a last ditch attempt, we tried to create a colormap with all of its cells allocated (which can be requested when calling XCreateColormap). Then we attempted to store colors into this map using XStoreColors. When the application main loop is started, the following error message is displayed

X Error of failed request BadMatch (invalid parameter attributes)
Major opcode of failed request 78 (X_CreateColormap)
Serial number of failed request 154
Current serial number in output stream 159

We have no problem allocating read only color cells in a user-defined colormap. However, we need the flexibility of read/write color cells for our application.

We would appreciate any help or advice on this matter. We can supply source code if requested.

Bryon Lawrence/Moria Shebsovich

Wed, 03/26/2003 - 02:04#1

Wed, 03/26/2003 - 02:04#1

ICS_support

Creating Read/Write Color Cells

There could be an easy explanation for this perhaps the visual you`re getting on the Linux server is not PseudoColor.

There are some simple utilities that you can use xdpyinfo, which should be on your system, returns information about the visuals available on the server; in addition, xsetstdcmap or xstdcmap can help you deduce the standard colormaps for the display.