Gets a pixel value at a specified position in a GdkImage.
image : a GdkImage.
x : the x coordinate of the pixel to get.
y : the y coordinate of the pixel to get.
Returns : the pixel value at the given position.
See Also
Bitmaps and Pixmaps
Graphics which are stored on the X Windows server. Since these are stored on the server they can be drawn very quickly, and all of the Drawing Primitives can be used to draw on them. Their main disadvantage is that manipulating individual pixels can be very slow.
GdkRGB
Built on top of GdkImage, this provides much more functionality, including the dithering of colors to produce better output on low-color displays.
Colormaps and Colors
Name
Colormaps and Colors -- manipulation of colors and colormaps.
Synopsis
|
Description
These functions are used to modify colormaps. A colormap is an object that contains the mapping between the color values stored in memory and the RGB values that are used to display color values. In general, colormaps only contain significant information for pseudo-color visuals, but even for other visual types, a colormap object is required in some circumstances.
There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with gdk_colormap_get_system()) is the default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in which GdkRGB works, retrieved with gdk_rgb_get_cmap(). However, when using GdkRGB, it is not generally necessary to allocate colors directly.
In previous revisions of this interface, a number of functions that take a GdkColormap parameter were replaced with functions whose names began with "gdk_colormap_". This process will probably be extended somewhat in the future - gdk_color_white(), gdk_color_black(), and gdk_color_change() will probably become aliases.
Details
struct GdkColor
|
The GdkColor structure is used to describe an allocated or unallocated color.
pixel For allocated colors, the value used to draw this color on the screen.
red The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
green the blue component of the color.
blue the green component of the color..
struct GdkColormap
|
The colormap structure contains the following public fields.
size For pseudo-color colormaps, the number of colors in the colormap..
colors An array containing the current values in the colormap. This can be used to map from pixel values back to RGB values. This is only meaningful for pseudo-color colormaps.