SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from RedHat Other XITE-3.3-3.i386.rpm

CMAP

Section: C Library Functions (3)
Updated: 16 Mar 1998
Index

 

NAME

GetImageColormap, cmapOfVisual, cmapOfVisualClass,RGBPixel, InitColortablePixels, InitColortableGray,InitColortableGrayPart, SpreadGray, PrintColormap,PrintWidgetColormap, ColormapCopy, ColormapStd - XITEmodule for initializing X11 colormaps.

 

SYNTAX


 #include <xite/Cmap.h>


 void GetImageColormap( Display* dpy,
    int screen, int planes, Visual* visual,
    Colormap* colormap );


 void ColormapCopy( Display* dpy, int screen,
    Colormap dest, Colormap source,
    int composite );


 void ColormapStd( Display* dpy, int screen,
    Colormap map, int visualClass, int nr );


 void PrintWidgetColormap( Display* dpy,
    Widget wid );


 void PrintColormap( Display* dpy, Colormap map,
    int len, int composite );


 Colormap cmapOfVisual( Visual* visual,
    int planes );


 Colormap cmapOfVisualClass(
    int visualClass, int planes );


 void InitColortableGrayPart( XColor* col,
    int min, int max, int step, int composite );


 void InitColortableGray( XColor* col, int len,
    int step, int composite );


 void InitColortablePixels( XColor* col,
    int len, int offset, int composite );


 void SpreadGray( XColor *col, int num_colors,
    int pix_min, int num_cells );


 int RGBPixel( int pix, Visual* visual );

 

DESCRIPTION

GetImageColormapreturns in *colormapthe XITE-initialcolormap for the specified visualand planes.If *colormapis non-NULL on entry, don't change it.

For a PseudoColor visual with planesequal to 8, theXITE-initial colormap is a 256-entry grayscale map with valuesequally distributed in steps of 257 from 0 to 65535.

For a PseudoColor visual with planesequal to 7(reduced-color display of images to reduce "technicolor" effectand allow overlay planes), the XITE-initial colormap consistsof four parts. The first and fourth part, entries [0..63] and[224..255], are either copies of the corresponding entries inthe default colormap (if the default visual is 8-bitPseudoColor) or a grayscale map with values in steps of 257from 0 to 16191 and from 57568 to 65535.The second part, entries [64..191}, is grayscale in stepsof 514 from 0 to 65278. The third part, entries [192..223],contains a predefined table for image overlays.

For a DirectColor visual with planesequal to 24, theXITE-initial colormap is similar to the colormap for the 8-bitPseudoColor case, except that each primary in the DirectColorcase is a copy of the single PseudoColor map.

For a DirectColor visual with planesequal to 21, theXITE-initial colormap is similar to the colormap for thereduced-color 8-bit PseudoColor case, except that each primaryin the DirectColor case is a copy of the single PseudoColormap.

For a TrueColor visual with planesequal to 24, theXITE-initial colormap equals the default colormap.

cmapOfVisualis essentially the same as GetImageColormap,but with a different interface.

cmapOfVisualClassis the same as cmapOfVisualexcept withvisual specified with classinstead of visual.

InitColortablePixelsinitializes the pixelvalues of entries[0..(len-1)] in colortab col.The values are in steps of 1from offsetto offset+ len- 1. The values of theprimaries are all set to zero. If compositeis True, thepixelvalues are regarded as consisting of three 8-bit parts,each of which is initialized as described.

InitColortableGrayinitializes the pixelvalues of entries[0..(len-1)] the same way as InitColortablePixels.Inaddition, the three primaries are given values in steps ofstepfrom 0 to step* (len- 1).

InitColortableGrayPartbehaves like InitColortableGray,except that it treats the entries [min..max]. The values ofthe primaries are as for InitColortableGray(compensatedfor min).

SpreadGrayspreads num_colorsevenly in col,startingwith pixel pix_min.Only the primaries in colare changed,not the pixel or flag components. num_cells/ num_colorsneighbors will be equal.

PrintColormapprints to stderr the contents of mapforentries [0..len-1]. The output is four-column ascii withpixelvalue (hexadecimal) and the three primary values.

PrintWidgetColormapprints to stderr the contents ofthe colormap presently used by wid.

RGBPixelconstructs a three-part (8 bit each) compositepixelvalue if visualis of class DirectColor or TrueColor.Otherwise, pixis returned unchanged.

ColormapCopycopies the rgb values in the sourcecolormapinto the destcolormap (after "hardware-approximation").

ColormapStd"hardware-approximates" the global colortablestdcol1_s(16 elements) or stdcol2_s(32 elements) into thevirtual colormap map.The choice depends on nr(stdcol1_sfor nrequal to 1, stdcol2_sfor nrequal to 2).

 

SEE ALSO

Visual(3),xshow(1),ximage(3),ximageInit(3)

 

AUTHOR

Svein Bøe, original version by Otto Milvang.

 

ID

$Id: Cmap.c,v 1.14 1997/05/25 11:47:53 svein Exp $


 

Index

NAME
SYNTAX
DESCRIPTION
SEE ALSO
AUTHOR
ID

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector