Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XAllocColoB(3x) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XAllocColorCells − allocate read/write (nonshared) colorcells. 

Synopsis

Status XAllocColorCells(display, colormap, contig, plane_masks_return, nplanes, pixels_return, npixels_return)
Display *display;
Colormap colormap;
Bool contig;
unsigned long plane_masks_return[nplanes];
unsigned int nplanes;
unsigned long pixels_return[npixels_return];
unsigned int npixels_return;

Arguments

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

colormapSpecifies the ID of the colormap in which the colorcell is to be allocated. 

contigSpecifies a boolean value.  Pass True if the planes must be contiguous or False if the planes need not be contiguous. 

plane_mask
Returns an array of plane masks.

nplanesSpecifies the number of plane masks returned in the plane masks array.  Must be nonnegative. 

pixels_return
Returns an array of pixel values.

npixels_return
Specifies the number of pixel values returned in the pixels_return array.  Must be positive. 

Description

XAllocColorCells() allocates read/write colorcells in a read/write colormap.  If npixels_return and nplanes are requested, then npixels_return base values and nplanes plane masks are returned.  No mask will have any bits in common with any other mask, or with any of the pixels.  By ORing together each of the pixels_return with any combination of the plane_masks_return, distinct pixel values can be produced.  For GrayScale or PseudoColor, each mask will have exactly one bit, and for DirectColor each will have exactly three bits.  If contig is True, then if all plane masks are ORed together, a single contiguous set of bits will be formed for GrayScale or PseudoColor and three contiguous sets of bits (one within each pixel subfield) for DirectColor.  The RGB values of the allocated entries are undefined until set with XStoreColor, XStoreColors(), or Status is zero on failure, and nonzero on success.  For more information, see Volume One, Chapter 7, Color. 

Errors

BadColor

BadValuenplanes is negative. 
npixels_return is not positive. 

See Also

BlackPixel(), WhitePixel(), XAllocColor(), XAllocColorPlanes(), XFreeColors(), XLookupColor(), XParseColor(), XQueryColor(), XQueryColors(), XStoreColor(), XStoreColors(),

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026