gnu.gcj.xlib
Class Colormap
An X11 color map resource.
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
allocateColor
public XColor allocateColor(int r,
int g,
int b)
Allocate a color consisting of the given RGB-triplet.
- a color object describing the allocated color.
allocateColorPixel
public long allocateColorPixel(XColor color)
Allocate color pixel.
color
- The color to be allocated. If allocation is
successful, this object will be modified to reflect the actual
color that was allocated.
- the pixel value of the allocated color.
getSharedColors
public XColor[] getSharedColors()
Get an array of all colors that currently resides in shared (read
only) color-cells in this color map.
getXColors
public XColor[] getXColors()
Get all colors currently residing in this color map. Colors that
are shared (read only) are marked as such by the color flags.
The indexes of the returned array will correspond to the
colorcells of the color map. Given a color XColor
color
from a given color-cell, the expression
color.getFlags() == Colormap.FLAG_SHARED
will check
whether the color-cell is shared.
Copyright (C) 2000 Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details.