File: gcpUnmapRGBAPixel.3

package info (click to toggle)
libggigcp 1.0.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,580 kB
  • ctags: 497
  • sloc: sh: 9,172; ansic: 2,396; makefile: 176
file content (56 lines) | stat: -rw-r--r-- 2,358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.TH "gcpUnmapRGBAPixel" 3 "2005-07-30" "libggigcp-1.0.x" GGI
.SH NAME
\fBgcpUnmapRGBAPixel\fR, \fBgcpUnpackRGBAPixels\fR, \fBgcpUnmapYUVPixel\fR, \fBgcpUnpackYUVPixels\fR, \fBgcpUnmapCMYKPixel\fR, \fBgcpUnpackCMYKPixels\fR, \fBgcpUnmapHSVPixel\fR, \fBgcpUnpackHSVPixels\fR, \fBgcpUnmapYCCPixel\fR, \fBgcpUnpackYCCPixels\fR : Convert from gcp_pixel(s) to gcp_*colors(s)
.SH SYNOPSIS
.nb
.nf
#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);
.fi

.SH DESCRIPTION
\fBgcpUnmap*Pixel\fR gets the color associated with the given pixelvalue.

\fBgcpUnpack*Pixels\fR converts the pixelvalues in \fIbuf\fR to individual
elements of \fIcols\fR.  This function may be used to convert buffers
output by the \fBggiGet{HLine,VLine,Box}\fR functions from the pixelvalue
representation to their actual colors as defined by \f(CWgcp_color(3)\fR.

Try to cache the results of color lookups in your application for
efficiency purposes.
.SH RETURN VALUE
\fBgcpUnmap*Pixel\fR and \fBgcpUnpack*Pixels\fR return \fB0\fR
for OK, otherwise an \f(CWggi-error(3)\fR code.
.SH SEE ALSO
\f(CWgcp_color(3)\fR, \f(CWgcp_pixel(3)\fR,

\f(CWgcpMapRGBAColor(3)\fR, \f(CWgcpPackRGBAColors(3)\fR,
\f(CWgcpMapYUVColor(3)\fR, \f(CWgcpPackYUVColors(3)\fR,
\f(CWgcpMapCMYKColor(3)\fR, \f(CWgcpPackCMYKColors(3)\fR,
\f(CWgcpMapHSVColor(3)\fR, \f(CWgcpPackHSVColors(3)\fR,
\f(CWgcpMapYCCColor(3)\fR, \f(CWgcpPackYCCColors(3)\fR
\f(CWggiGetBox(3)\fR, \f(CWggiGetHLine(3)\fR, \f(CWggiGetVLine(3)\fR