| N F O _ G E T C M C O L O R S ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English AMIGA - NFO_#?
----------------------------------------------------------------------------
NAME
nfo_getcmcolors() - Obtains desired amount of colors from
ColorMap and stores them in ColorSpec
(RGB4!).
SYNOPSIS
total = nfo_getcmcolors(cs, cm, start, amount);
LONG nfo_getcmcolors(struct ColorSpec *,
struct ColorMap *, LONG, LONG);
FUNCTION
This function allows to fetch RGB values of requested pens
and stores them in ColorSpec array. Obtained data is 4 bits
per gun!
INPUTS
cs - Pointer to start of ColorSpec.
cm - ColorMap pointer.
start - Start pen in a ColorMap.
amount - Number of pens to extract.
RETURNS
Function returns how many pens were actually extracted.
BASES
IntuitionBase
NOTES
This func. regards total available pens in 'cm' plus checks
for possible terminator in 'cs'. You should generally term.
ColorSpec table before passing it to this func., so possible
mem. trash can be avoided if you pass too much in 'amount'.
SEE ALSO
EXAMPLE
...
struct Screen *screen;
struct ColorSpec cs[] =
{
{ 0, 0x0, 0x0, 0x0},
{ 1, 0x0, 0x0, 0x0},
{ 2, 0x0, 0x0, 0x0},
{ 3, 0x0, 0x0, 0x0},
{-1, 0x0, 0x0, 0x0}
};
if ((screen = ctl_lockscreensafe(NULL)))
{
nfo_getcmcolors(&cs[0], screen->ViewPort.ColorMap, 0, 4);
ctl_unlockscreensafe(screen);
}
BUGS
None known.
----------------------------------------------------------------------------
| |
| |