EZ
Up Prev Next Contents


4.3 Allocating Colors

The following two routines can be used to allocate colors. They all return the pixel value for the specified color. If the exact color cannot be allocated, they return the closest match available.

unsigned long EZ_AllocateColorFromRGB(int r, int g, int b); unsigned long EZ_AllocateColorFromName(char *name);

The next function converts a pixel value to RGB.

void EZ_PixelValue2RGB(unsigned long pixel_value, int *r, int *g, int *b);


Up Prev Next Contents

HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>