Man Linux: Main Page and Category List

NAME

       gcpMapRGBAColor,  gcpPackRGBAColors,  gcpMapYUVColor, gcpPackYUVColors,
       gcpMapCMYKColor, gcpPackCMYKColors,  gcpMapHSVColor,  gcpPackHSVColors,
       gcpMapYCCColor,   gcpPackYCCColors  -  Convert  from  gcp_*color(s)  to
       gcp_pixel(s)

SYNOPSIS

       #include <ggi/gcp.h>

       gcp_pixel gcpMapRGBAColor(ggi_visual_t vis,
                     gcp_RGBAcolor *col);
       int gcpPackRGBAColors(ggi_visual_t vis,
                     void *buf,gcp_RGBAcolor *cols,int len);

       gcp_pixel gcpMapYUVColor(ggi_visual_t vis,
                     gcp_YUVcolor *col);
       int gcpPackYUVColors(ggi_visual_t vis,
                     void *buf,gcp_YUVcolor *cols,int len);

       gcp_pixel gcpMapCMYKColor(ggi_visual_t vis,
                     gcp_CMYKcolor *col);
       int gcpPackCMYKColors(ggi_visual_t vis,
                     void *buf,gcp_CMYKcolor *cols,int len);

       gcp_pixel gcpMapHSVColor(ggi_visual_t vis,
                     gcp_HSVcolor *col);
       int gcpPackHSVColors(ggi_visual_t vis,
                     void *buf,gcp_HSVcolor *cols,int len);

       gcp_pixel gcpMapYCCColor(ggi_visual_t vis,
                     gcp_YCCcolor *col);
       int gcpPackYCCColors(ggi_visual_t vis,
                     void *buf,gcp_YCCcolor *cols,int len);

DESCRIPTION

       gcpMap*Color gets the pixelvalue for the given color.

       gcpPack*Colors converts the colors in cols to pixelvalues in buf.   The
       output   from   this   function   is   suitable   for   input   to  the
       ggiPut{HLine,VLine,Box} functions.

       Try to cache the results of  color  lookups  in  your  application  for
       efficiency purposes.

RETURN VALUE

       gcpMap*Color returns a gcp_pixel(3).

       gcp*PackColors returns 0 for OK, otherwise an ggi-error(3) code.

SEE ALSO

       gcp_pixel(3),       gcpUnmapRGBAPixel(3),       gcpUnpackRGBAPixels(3),
       gcpUnmapYUVPixel(3),    gcpUnpackYUVPixels(3),    gcpUnmapCMYKPixel(3),
       gcpUnpackCMYKPixels(3),   gcpUnmapHSVPixel(3),   gcpUnpackHSVPixels(3),
       gcpUnmapYCCPixel(3),        gcpUnpackYCCPixels(3)         ggiPutBox(3),
       ggiPutHLine(3), ggiPutVLine(3)