GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  READCOLMAP (3)

NAME

RGB, readcolmap, writecolmap - access display color map

CONTENTS

Synopsis
Description
Source

SYNOPSIS

#include <u.h>
#include <libc.h>
#include <draw.h>

int readcolmap(Display *d, RGB *map)

int writecolmap(Display *d, RGB *map)

DESCRIPTION

Colors are described by their 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.

A color map is an array of RGBs, of length \x’-.8n’2depth, giving the colors for pixels 0, 1, 2, etc. On displays with color mapped pixels (typically 8-bit displays), one retrieves RGB color information by treating the pixel data as an offset into the color map.

Readcolmap reads the color map for the given display into the provided map, which must have enough space to hold it. Writecolmap associates the given color map with the given display, if possible. (The hardware might not allow this.) Both return 0 on success, or -1 on error, setting errstr.

Changing the hardware color map does not change the color map used by the draw(3) operator to convert between mapped and true color or greyscale images, which is described in color(7).

SOURCE

/usr/local/plan9/src/libdraw

SEE ALSO

graphics(3), draw(3), color(7)
Search for    or go to Top of page |  Section 3 |  Main Index


READCOLMAP (3) -->

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.