21 #ifndef GX_COLOURMAP_H
22 #define GX_COLOURMAP_H
60 unsigned long get(
int index )
const ;
63 unsigned int size()
const ;
66 int find(
unsigned long )
const ;
76 void addColour16(
int,
int,
int) ;
81 std::vector<unsigned long> m_map ;
89 return m_map[
static_cast<size_t>(index)] ;
int find(unsigned long) const
Does a reverse lookup to return the index value for the given pixel value.
A window class that is-a GX::Drawable and a GX::EventHandler.
unsigned long get(int index) const
Gets the pixel value for the given index value.
A colourmap class that provides pixel values for a set of mapped colours.
unsigned int size() const
Returns 16 for colours or 256 for greyscale.
ColourMap(Display &, bool greyscale256=false)
Constructor for a colourmap for the default visual providing 16 colours or 256 grey levels...
::Colormap x()
Returns the X colourmap id. See XCreateColormap(3).