CREATEGCFORCMAP(5ICD)

NAME
CreateGCforCmap - create a graphics context for use with the CACD colormap

SYNOPSIS

CreateGCforCmap (drawable, pGC)
Drawable *drawable;
GC *pGC;

PARAMETERS

drawable
    specifies the drawable for which the GC should be usable.

pGC a pointer to a GC in which the created GC is stored.

DESCRIPTION
The function CreateGCforCmap() creates a graphics context for use with the Nelsis ICD CACD colormap. First it creates the graphics context, whereafter the appropriate planemask for the graphics context is set. The created graphics context can be used with any destination drawable having the same root and depth as the specified drawable.

DIAGNOSTICS
If the call to CreateGCforCmap() is successful 1 is returned. If CreateGCforCmap() fails 0 will be returned and cacdcmaperrno will be set to one of the following values:

NOINIT
    the CACD colormap library was not initialized.

NOGC
    cannot create a GC.

SEE ALSO
CacdCmapIntro(5ICD) InitCacdCmap(5ICD) CoupleIdToColor(5ICD) CoupleIdToRGB(5ICD) GetPixelFromId(5ICD) SetForegroundFromId(5ICD)

NOTE
Clients using the CACD colormap library should NEVER set the planemask of a GC themselves, this produces undefined graphics results.