gcpUnmapRGBAPixel(3)

gcpUnmapRGBAPixel3

Convert from gcp_pixel(s) to gcp_*colors(s)

Usage

#include <ggi/gcp.h>
int gcpUnmapRGBAPixel(ggi_visual_t vis,
              gcp_pixel pixel,gcp_RGBAcolor *col);
int gcpUnpackRGBAPixels(ggi_visual_t vis,
              void *buf,gcp_RGBAcolor *cols,int len);
int gcpUnmapYUVPixel(ggi_visual_t vis,
              gcp_pixel pixel, gcp_YUVcolor *col);
int gcpUnpackYUVPixels(ggi_visual_t vis,
              void *buf,gcp_YUVcolor *cols,int len);
int gcpUnmapCMYKPixel(ggi_visual_t vis,
              gcp_pixel pixel, gcp_CMYKcolor *col);
int gcpUnpackCMYKPixels(ggi_visual_t vis,
              void *buf,gcp_CMYKcolor *cols,int len);
int gcpUnmapHSVPixel(ggi_visual_t vis,
              gcp_pixel pixel, gcp_HSVcolor *col);
int gcpUnpackHSVPixels(ggi_visual_t vis,
              void *buf,gcp_HSVcolor *cols,int len);
int gcpUnmapYCCPixel(ggi_visual_t vis,
              gcp_pixel pixel, gcp_YCCcolor *col);
int gcpUnpackYCCPixels(ggi_visual_t vis,
              void *buf,gcp_YCCcolor *cols,int len);

Overview

gcpUnmap*Pixel gets the color associated with the given pixelvalue.

gcpUnpack*Pixels converts the pixelvalues in buf to individual elements of cols. This function may be used to convert buffers output by the ggiGet{HLine,VLine,Box} functions from the pixelvalue representation to their actual colors as defined by gcp_color(3).

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

Return value

gcpUnmap*Pixel and gcpUnpack*Pixels return 0 for OK, otherwise an ggi-error(3) code.

Releases

3 releases since Debian 4.0 (Etch); the text changed 1 time.

  1. 4.0
  2. 5.0–6.0

From libggigcp1-dev 1.0.2+dfsg1-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.