SETFOREGROUNDFROMID(5ICD)

NAME
SetForegroundFromId - set the foreground pixel of a gc to the pixel associated with the Id

SYNOPSIS

SetForegroundFromId (gc, Id)
GC gc;
int Id;
SetForegroundFromIds (gc, Ids, n)
GC gc;
int Ids[];
int n;
SetBackgroundFromId (gc, Id)
GC gc;
int Id;
SetBackgroundFromIds (gc, Ids, n)
GC gc;
int Ids[];
int n;

PARAMETERS

gc  the graphics context of which the fore- or background pixel should be set.

Id(s)
    Id's to identify the pixel value by.

n   specifies the number of Ids.

DESCRIPTION
These functions set the foreground or background pixel value of the specified graphics context to the pixel value obtained by OR'ing together the pixel values of the specified Id's.

DIAGNOSTICS
If a call to these functions is successful 1 is returned. If a call to these functions fails 0 will be returned and cacdcmaperrno will be set to one of the following values:

NOINIT
    the CACD colormap library was not initialized.

BADID
    a specified Id did not exist.

SEE ALSO
InitCacdCmap(5ICD) CoupleIdToColor(5ICD) CoupleIdToRGB(5ICD) GetAffectedIds(5ICD) GetPixelFromId(5ICD)