🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #37888

XAllocColor

#37888
From: Adrian P. Nye
Date: Fri, 09 Mar 1990 17:38
28 lines
1710 bytes
You're right, the description of the operation of XAllocColor 
in the first edition of the O'Reilly Xlib Programming Manual
is not completely correct.  Here is the text from the Second
edition, which is going to the printer on March 12th.

"If the display hardware has an immutable
hardware colormap, the entire colormap will be read-only, and
the closest cell that exists will be returned.  Otherwise,
the colormap is read/write, and may have some read/write cells,
some read-only cells, and some unallocated cells.
If a read-only cell exists that matches the requested RGB values,
that cell is returned.
If no matching cell exists but there are unallocated cells, a
cell is allocated to match the specified RGB values.
If no matching cell exists and there are no unallocated cells,
XAllocColor returns a Status of zero
(it does not return the closest available read-only colorcell that
has already been allocated).
If it succeeds, XAllocColor returns nonzero."

The Second edition of Volumes 1 and 2 covers R3 and R4 and have a much 
better description of color handling.

________________________________________
Adrian Nye (617) 354-5800
O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks
90 Sherman Street, Cambridge, MA 02140
UUCP:   uunet!ora!adrian      ARPA:   adrian@ora.uu.net
Technical Details
Message-ID: <1990Mar9.173800.24009@cec1.wustl.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!cec2!apn1713

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!cec2!apn1713
From: apn1713@cec1.wustl.edu (Adrian P. Nye)
Newsgroups: comp.windows.x
Subject: XAllocColor
Message-ID: <1990Mar9.173800.24009@cec1.wustl.edu>
Date: 9 Mar 90 17:38:00 GMT
Sender: news@cec2 (USENET News System)
Distribution: na
Organization: Washington University, St. Louis MO
Lines: 28