Query: rgbpix
OS: plan9
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
RGBPIX(2) System Calls Manual RGBPIX(2)NAMERGB, rgbpix, rdcolmap, wrcolmap - handle color screensSYNOPSIS#include <u.h> #include <libc.h> #include <libg.h> ulong rgbpix(Bitmap *b, RGB rgb) void rdcolmap(Bitmap *b, RGB *map) void wrcolmap(Bitmap *b, RGB *map)DESCRIPTIONColors are described by the red, green, and blue light intensities, in an RGB datum: typedef struct RGB { ulong red; ulong green; ulong blue; } RGB; Black is represented by zero in all three positions and white has the maximum unsigned long value in all three positions. Some of the graphics functions, such as point (see bitblt(2)), take a pixel value argument, which is a single unsigned long. For a given bitmap, rgbpix returns the pixel value with a color closest to the color represented by the rgb argument. There is a colormap associated with each Bitmap. A colormap is an array of RGBs, of length 2^(2^ldepth), giving the colors for pixels 0, 1, 2, etc. Rdcolmap reads the colormap for the given bitmap into the provided map, which must have enough space to hold it. Wrcolmap associates the given colormap with the given bitmap, if possible. (The hardware might not allow this.)SOURCE/sys/src/libgSEE ALSOgraphics(2)BUGSThese functions work only for the screen bitmap. This interface will have to be refined for screens with more than 8 bits per pixel. RGBPIX(2)
Related Man Pages |
---|
xstorenamedcolor(3x11) - ultrix |
xallocnamedcolor(3) - hpux |
xlookupcolor(3) - hpux |
xstorecolob(3) - hpux |
imagecolorclosest(3) - php |
Similar Topics in the Unix Linux Community |
---|
Xlib - Mapping Pixel Values to RGB Colors |
xoris 0.1e (Default branch) |
Colibri 1.0.8 |
Colibri 1.0.9 |
Colibri 1.1.1 |