EW_ColorMapping

EW_ColorMapping

ew

1998 12-05


CLASS

EW_ColorMapping - color remapping (for images)


SYNOPSIS

EW_ColorMapping


PUBLIC MEMBER FUNCTIONS


void SetMapToIndex(long mapindex,long colorindex)
Set mapping for mapindex of colorindex colorindex, such as EW_RED.



void SetMapToColor(long mapindex,long hexcolor)
Set mapping for mapindex of specfic shade hexcolor, such as 0x00ff0000 (for red).



long IsIndex(long mapindex)
Returns TRUE if the mapindex was specified using a colorindex.



long GetMapColor(long mapindex)
Returns the color specified by specific shade. Not valid if specified by colorindex.



long GetMapIndex(long mapindex)
Returns the color specified by index. Not valid if specified by specific shade.


FILES

ew/gfx.h General graphics header file


SEE ALSO

EW_intro(3), ewLoadImageXPM(3), ewReadImageXPM(3)


NOTES

For an XPM, the mapindex refers to the entry in the order listed in the color specification section of the file.


The remap is effective up to the largest mapindex specified. Currently, any unspecified mapindex's up that point will be undefined.


Currently, the index 255 refers to transparent.


AUTHOR

Jason Weber