gcpPackYCCColors(3) Convert from gcp_*color(s) to gcp_pixel(s)

Other Alias

gcpMapRGBAColor, gcpPackRGBAColors, gcpMapYUVColor, gcpPackYUVColors, gcpMapCMYKColor, gcpPackCMYKColors, gcpMapHSVColor, gcpPackHSVColors, gcpMapYCCColor

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.