This object stores the mapping between the color values stored
in memory and the RGB values that are used to display color values.
allocateColor
public boolean allocateColor(Color color,
boolean writable,
boolean bestMatch)
Allocates a single color from a colormap.
color
- The color to allocatewritable
- If true the color is allocated writable.bestMatch
- If true GDK will attempt to do matching against existing
colors if the color cannot be allocated as requested.
allocateColors
public boolean[] allocateColors(Color[] colors,
boolean writable,
boolean bestMatch)
Allocates colors from a colormap.
colors
- writable
- bestMatch
-
freeColors
public void freeColors(Color[] colors)
Frees previously allocated Colors.
colors
-
gdk_colormap_alloc_color
protected static final boolean gdk_colormap_alloc_color(Handle colormap,
Handle color,
boolean writable,
boolean best_match)
gdk_colormap_alloc_colors
protected static final int gdk_colormap_alloc_colors(Handle colormap,
Handle[] colors,
boolean writable,
boolean bestMatch,
boolean[] success)
gdk_colormap_free_colors
protected static final void gdk_colormap_free_colors(Handle colormap,
Handle[] colors)
gdk_colormap_get_screen
protected static final Handle gdk_colormap_get_screen(Handle colormap)
gdk_colormap_get_system
protected static final Handle gdk_colormap_get_system()
gdk_colormap_get_type
protected static final int gdk_colormap_get_type()
gdk_colormap_get_visual
protected static final Handle gdk_colormap_get_visual(Handle colormap)
gdk_colormap_new
protected static final Handle gdk_colormap_new(Handle visual,
boolean allocate)
gdk_colormap_query_color
protected static final void gdk_colormap_query_color(Handle colormap,
long pixel,
Handle result)
getScreen
public Screen getScreen()
Returns the screen for which the colormap was created.
getSystem
public static Colormap getSystem()
Returns the system's default colormap.
getVisual
public Visual getVisual()
Returns the visual for which the colormap was created.
queryColor
public Color queryColor(long pixel)
Locates the RGB color corresponding to the given hardware
pixel. The pixel must be a valid pixel in the colormap.
pixel
-