Rogue Wave Views |
Rogue Wave Views Documentation Home |
Colormap class. More...
#include <ilviews/bitmaps/colormap.h>
Public Member Functions | |
IlvColorMap (IlUInt numcols=256) | |
Constructor. More... | |
virtual | ~IlvColorMap () |
Destructor. Releases the memory used by the instance. | |
IlUChar | getA (IlUInt index) const |
Returns the alpha component of the given index entry. More... | |
IlUChar | getB (IlUInt index) const |
Returns the blue component of the given index entry. More... | |
IlUInt | getColorNum () const |
Returns the number of color entries in the colormap. More... | |
IlBoolean | getEntry (IlUInt index, IlUChar &r, IlUChar &g, IlUChar &b) const |
Returns the color components of the given entry. More... | |
IlBoolean | getEntry (IlUInt index, IlUChar &r, IlUChar &g, IlUChar &b, IlUChar &a) const |
Returns all the color components of the given entry. More... | |
IlUChar | getG (IlUInt index) const |
Returns the green component of the given index entry. More... | |
IlUChar | getR (IlUInt index) const |
Returns the red component of the given index entry. More... | |
IlUInt | getRefCount () const |
Returns the reference count for this instance. | |
void | lock () |
Locks the current instance. | |
IlBoolean | setEntry (IlUInt index, IlUChar r, IlUChar g, IlUChar b, IlUChar a=255) |
Sets an entry of the colormap. More... | |
void | unLock () |
Unlocks the current instance. If the reference count is 0 the instance is deleted. | |
Colormap class.
Library: xviews or winviews or mviews (mutually exclusive)
The IlvColorMap
class lets you manipulate colormaps. This class hides internal memory storage of a colormap. Colormaps can have an unlimited amount of color entries, each being described as a quadruplet of red, green, blue, and alpha components. Colormaps can be shared and must be locked and unlocked.
IlvIndexedBitmapData
, IlvQuantizer
IlvColorMap::IlvColorMap | ( | IlUInt | numcols = 256 | ) |
Constructor.
Initializes a new IlvColorMap
object representing a colormap.
numcols | The number of entries in the colormap. |
Returns the alpha component of the given index entry.
index | The index of the entry. |
Returns the blue component of the given index entry.
index | The index of the entry. |
IlUInt IlvColorMap::getColorNum | ( | ) | const |
Returns the number of color entries in the colormap.
Returns the color components of the given entry.
index | The index of the entry. |
r | The red component of the entry. |
g | The green component of the entry. |
b | The blue component of the entry. |
IlTrue
if index is a valid index entry, IlFalse
if not. IlBoolean IlvColorMap::getEntry | ( | IlUInt | index, |
IlUChar & | r, | ||
IlUChar & | g, | ||
IlUChar & | b, | ||
IlUChar & | a | ||
) | const |
Returns all the color components of the given entry.
index | The index of the entry. |
r | The red component of the entry. |
g | The green component of the entry. |
b | The blue component of the entry. |
a | The alpha component of the entry. |
IlTrue
if index is a valid index entry, IlFalse
if not. Returns the green component of the given index entry.
index | The index of the entry. |
Returns the red component of the given index entry.
index | The index of the entry. |
Sets an entry of the colormap.
index | The index of the entry. |
r | The red component of the entry. |
g | The green component of the entry. |
b | The blue component of the entry. |
a | The alpha component of the entry. |
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.