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