RgbCmap

Description GdkRGB is a low-level module which renders RGB, grayscale, and indexed colormap images to a GdkDrawable. It does this as efficiently as possible, handling issues such as colormaps, visuals, dithering, temporary buffers, and so on. Most code should use the higher-level GdkPixbuf features in place of this module; for example, gdk_draw_pixbuf() uses GdkRGB in its implementation. GdkRGB allocates a color cube to use when rendering images. You can set the threshold for installing colormaps with gdk_rgb_set_min_colors(). The default is 5x5x5 (125). If a colorcube of this size or larger can be allocated in the default colormap, then that's done. Otherwise, GdkRGB creates its own private colormap. Setting it to 0 means that it always tries to use the default colormap, and setting it to 216 means that it always creates a private one if it cannot allocate the 6x6x6 colormap in the default. If you always want a private colormap (to avoid consuming too many colormap entries for other apps, say), you can use gdk_rgb_set_install(TRUE). Setting the value greater than 216 exercises a bug in older versions of GdkRGB. Note, however, that setting it to 0 doesn't let you get away with ignoring the colormap and visual - a colormap is always created in grayscale and direct color modes, and the visual is changed in cases where a "better" visual than the default is available. If GDK is built with the Sun mediaLib library, the GdkRGB functions are accelerated using mediaLib, which provides hardware acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib support can be turned off by setting the GDK_DISABLE_MEDIALIB environment variable.

Constructors

this
this(GdkRgbCmap* gdkRgbCmap)

Sets our main struct and passes it to the parent class

this
this(uint[] colors)

Warning gdk_rgb_cmap_new is deprecated and should not be used in newly-written code. Creates a new GdkRgbCmap structure. The cmap maps color indexes to RGB colors. If n_colors is less than 256, then images containing color values greater than or equal to n_colors will produce undefined results, including possibly segfaults.

Members

Functions

free
void free()

Warning gdk_rgb_cmap_free is deprecated and should not be used in newly-written code. Frees the memory associated with a GdkRgbCmap created by gdk_rgb_cmap_new().

getRgbCmapStruct
GdkRgbCmap* getRgbCmapStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

Variables

gdkRgbCmap
GdkRgbCmap* gdkRgbCmap;

the main Gtk struct

Meta