VGetColormap


 
Name
  VGetColormap - returns the R, G, B values in 3DVIEWNIX colormap.
 
Synopsis
  VGetColormap(colors, ncolors)
  ViewnixColor *colors;
  int ncolors;
 
Description
  VGetColormap returns the R,G,B values in the colormap for the colorcell 
corresponding to the pixel value specified in the pixel of each element of 
the ViewnixColor structure. The R,G,B values are stored in the red, green, 
blue members of the same structure. If a pixel is out of range or has a
bad value, an error code is returned.
 
Structures
  typedef struct {
        unsigned long pixel;            /*pixel value*/
        unsigned short  red,green,blue; /*RGB values*/
  } ViewnixColor;

Return Value
  0 - work successfully.
  232 - the pixel has invalid index in the colormap.
 
Parameters
  colors - specifies and returns an array of the RGB values in the red, green,
 	and blue members of the ViewnixColor structures.
  ncolors - specifies the number of ViewnixColor structures in the 
	colors array.
 
Side Effects
  None.
 
Entry Conditions
  If ncolors is less than or equal to zero, colors is NULL, or VCreateColormap
is not called earlier, VGetColormap prints an error message to the standard
error stream, produces a core dump file and exits from the current process.
 
Related Functions
VGetReservedColors, VGetFreeColorcells, VLoadColormap, VPutColormap, VSaveColormap, VCreateColormap, VGetColorcellStatus.