org.gnu.gdk
public class Colormap extends GObject
Constructor Summary | |
---|---|
Colormap()
Create a Colormap initialized to the system's default colormap. | |
Colormap(Handle handle)
Create a new Colormap from a handle to a native resource. | |
Colormap(Visual v, boolean allocate)
Creates a new colormap for the given visual. |
Method Summary | |
---|---|
boolean | allocateColor(Color color, boolean writable, boolean bestMatch)
Allocates a single color from a colormap.
|
boolean[] | allocateColors(Color[] colors, boolean writable, boolean bestMatch)
Allocates colors from a colormap.
|
void | freeColors(Color[] colors)
Frees previously allocated Colors.
|
static Colormap | getColormapFromHandle(Handle hndl)
Internal static factory method to be used only by Java-Gnome. |
Color[] | getColors()
Retrieve all of the Colors associated with the Colormap. |
Screen | getScreen()
Returns the screen for which the colormap was created. |
static Colormap | getSystem()
Returns the system's default colormap. |
Type | getType() |
Visual | getVisual()
Returns the visual for which the colormap was created. |
Color | queryColor(long pixel)
Locates the RGB color corresponding to the given hardware pixel. |
Parameters: color The color to allocate writable 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.
Parameters: colors writable bestMatch
Parameters: colors
Parameters: pixel