mapcolor(3G) mapcolor(3G)
mapcolor - changes a color map entry
void mapcolor(i, red, green, blue)
Colorindex i;
short red, green, blue;
i expects the index into the color map.
red expects an intensity value in the range 0 to 255 for red to be
associated with the index.
green expects an intensity value in the range 0 to 255 for green to be
associated with the index.
blue expects an intensity value in the range 0 to 255 for blue to be
associated with the index.
mapcolor loads entry i of the color map for the current drawing mode with
(red, green, blue). Pixels written with color index i are displayed with
the specified RGB intensities. The valid range for i depends on the
number of bitplanes available in the current drawing and buffer modes,
i.e. the value returned by getplanes. Using Ni to represent 2 raised to
the return value of getplanes in drawing mode i, the valid ranges are:
NORMALDRAW 0 to Nn-1.
OVERDRAW 1 to No-1.
UNDERDRAW 0 to Nu-1.
PUPDRAW 1 to Np-1.
CURSORDRAW 1 to getgdesc(GD_BITS_CURSOR).
If Ni is 1, then no indices are valid. Invalid indices are ignored by
mapcolor.
In multimap mode, mapcolor updates only the small color map currently
selected by setmap.
The color map entry that controls the color of the cross-hair cursor
(cursor type CCROSS) is returned by the getgdesc inquiry
GD_CROSSHAIR_CINDEX.
color, curstype, drawmode, gammaramp, getgdesc, getmcolor, getplanes,
glcompat, setmap
This subroutine is available only in immediate mode.
Page 1
mapcolor(3G) mapcolor(3G)
On the IRIS-4D G, you should not alter the top 256 colors (color indices
3840 to 4095). The system uses these colors for the cursor, overlay bitplanes,
and RGB mode. If you alter the colors to which these features are
mapped, some screen features will appear in strange colors.
In IRIX 4.0, mapcolor is implemented as an emulation layer on top of the
request XStoreColors. In order to avoid a serious degradation in performance,
mapcolor requests are buffered and only sent to the window server
when an input routine (e.g. qtest) or gflush is called.
In situations where the immediate results of mapcolor are more important
than speed, there is a glcompat call to disable this behavior.
PPPPaaaaggggeeee 2222 [ Back ]
|