home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bds-colr.zip / colormap.READM < prev   
Text File  |  1992-08-25  |  2KB  |  37 lines

  1.    Colormap by Barry Solomon, Copyright 1990, 1991, 1992.  
  2.    Permission to copy and/or distribute this program is hereby granted, 
  3.    given that recognition of my contribution is noted.
  4.  
  5.    This program displays the hardware colormap by creating a two-dimensional
  6.    grid either 16x16 or 4x4 (8 or 4 plane visuals respectivly) of little
  7.    filled rectangles of size cellwidth x cellheight.  Each filled rectangle
  8.    will be filled with a unique color from the colortable.
  9.  
  10.    Button Commands:
  11.     When the user depresses button 1 in a "colorcell", the color
  12.     that is displayed by that filled rectangle will be changed to cyan until
  13.     the button is released when the previous colormap will be re-installed. 
  14.     The color cell id and the rgb value of that cell will be displayed.
  15.       Button1       - Highlight a colorcell
  16.       Button2       - Allocate an unallocated colorcell
  17.       Shift-Button2 - Allocate and set the color of an unallocated colorcell.
  18.       Button3       - Unallocate a colorcell previously allocated by us.
  19.  
  20.    Key Commands:
  21.     'a' - cycle the colors in the installed colormap
  22.     'A' - run a single white color through the installed colormap
  23.     'd' - display the default colormap
  24.     'g' - Get all available colors and allocate
  25.     'l' - load a mixed color ramp and display
  26.     's' - show all allocated colormap entries
  27.     'S' - Unshow all allocated colormap entries
  28.     't' - toggle between a 4 and 8 bit visual and redisplay the colormap
  29.     'u' - Unget all colors that we have allocated
  30.     'q' - quit
  31.  
  32. To compile, simply type:
  33.     cc colormap.c -o colormap -lX11
  34.  
  35. This should work for most unix machines of any flavor, but you may need to
  36. mess around with the include specification.
  37.