12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTcolormap.)The properties containing the XStandardColormap information have the typeRGB_COLOR_MAP.The remainder of this section discusses standard colormap properties and atoms as well as how tomanipulate standard colormaps.14.3.1. Standard Colormap Properties and AtomsSeveral standard colormaps are available. Each standard colormap is defined by a property, andeach such property is identified by an atom. The following list names the atoms and describes thecolormap associated with each one. The header file contains the definitions foreach of the following atoms, which are prefixed with XA_.RGB_DEFAULT_MAPThis atom names a property. The value of the property is an array of XStandardColormapstructures. Each entry in the array describes an RGB subset of the default colormap for the Visual specified by visual_id.Some applications only need a few RGB colors and may be able to allocate them from thesystem default colormap. This is the ideal situation because the fewer colormaps that areactive in the system the more applications are displayed with correct colors at all times.Atypical allocation for the RGB_DEFAULT_MAP on 8-plane displays is 6 reds, 6 greens,and 6 blues. This gives 216 uniformly distributed colors (6 intensities of 36 different hues)and still leaves 40elements of a 256-element colormap available for special-purpose colorsfor text, borders, and so on.RGB_BEST_MAPThis atom names a property. The value of the property is an XStandardColormap.The property defines the best RGB colormap available on the screen. (Of course, this is asubjective evaluation.) Many image processing and three-dimensional applications need touse all available colormap cells and to distribute as many perceptually distinct colors aspossible over those cells. This implies that there may be more green values available thanred, as well as more green or red than blue.For an8-plane PseudoColor visual, RGB_BEST_MAP is likely to be a 3/3/2 allocation.For a24-plane DirectColor visual, RGB_BEST_MAP is normally an 8/8/8 allocation.RGB_RED_MAPRGB_GREEN_MAPRGB_BLUE_MAPThese atoms name properties. The value of each property is an XStandardColormap.The properties define all-red, all-green, and all-blue colormaps, respectively. These mapsare used by applications that want to make color-separated images. For example, a usermight generate a full-color image on an 8-plane display both by rendering an image threetimes (once with high color resolution in red, once with green, and once with blue) and bymultiply exposing a single frame in a camera.RGB_GRAY_MAPThis atom names a property. The value of the property is an XStandardColormap.The property describes the best GrayScale colormap available on the screen. As previouslymentioned, only the colormap, red_max, red_mult, and base_pixel members of theXStandardColormap structure are used for GrayScale colormaps.379

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!