home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xlibpr3.zip / basicwin / color / intrgb.frag < prev    next >
Text File  |  1989-11-25  |  533b  |  20 lines

  1.     XStandardColormap \f(CWbest_map_info\fP;
  2.     unsigned long red, green, blue;
  3.     unsigned long pixelvalue;
  4.     int status;
  5.  
  6.     status = \f(CWXGetStandardColormap\fP(display, \f(CWRootWindow\fP(display, 
  7.         screen), &best_map_info, XA_RGB_BEST_MAP);
  8.  
  9.     if (!status)
  10.         {
  11.         printf("%s: specified standard colormap not available", 
  12.                 argv[0]);
  13.         exit(-1);
  14.         }
  15.  
  16.     pixelvalue = \f(CWbest_map_info\fP.base_pixel +
  17.             (red * \f(CWbest_map_info\fP.red_mult) +
  18.             (green * \f(CWbest_map_info\fP.green_mult) +
  19.             (blue * \f(CWbest_map_info\fP.blue_mult);
  20.