Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XAllocColoC(3x) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XAllocColorPlanes − allocate read/write (nonshareable) color planes. 

Synopsis

Status XAllocColorPlanes(display, colormap, contig, pixels_return, npixels_return,

nreds, ngreens, nblues, rmask_return, gmask_return, bmask_return)  Display *display;  Colormap colormap;  Bool contig;  unsigned long pixels_return[npixels];  int npixels;  int nreds, ngreens, nblues;  unsigned long *rmask_return, *gmask_return, *bmask_return;

Arguments

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

colormapSpecifies the ID of the colormap to be used. 

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

pixels_return
Returns an array of pixel values.

npixelsSpecifies the number of pixel values returned in the pixels array.  Must be positive. 

nreds

ngreens

nbluesSpecify the number of red, green, and blue planes (shades).  Must be nonnegative. 

rmask_return
Return bit masks for the red, green, and blue planes.

gmask_return

bmask_return

Description

If npixels colors, nreds reds, ngreens greens, and nblues blues are requested, then npixels base values are returned, and the masks have nreds, ngreens, and nblues bits set to 1 respectively.  No mask will have any bits in common with any other mask, or with any of the pixels_return.  Unique pixel values are generated by by ORing together subsets of masks with each item in the pixels_return list (pixels_return does not by itself contain pixel values).  In doing this, note that
npixels*( ) distinct pixel values are allocated.  If contig is True, then each mask will have a contiguous set of bits.  For DirectColor, each mask will lie within the corresponding pixel subfield.  Note, however, that there are actually only ) independent red entries, ) independent green entries, and ) independent blue entries in the colormap.  This is true even for PseudoColor.  When the pixel value of a colormap entry is changed using the pixel is decomposed according to rmask_return, gmask_return, and bmask_return and the corresponding pixel subfield entries are updated.  Status is zero on failure, and nonzero on success.  For more information, see Volume One, Chapter 7, Color. 

Errors

BadColorcolormap is invalid. 

BadValuenpixels_return is not positive. 
At least one of nreds, ngreens, nblues is negative. 

See Also

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

Copyright O’Reilly & Assoc.  —  

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