IRGBAColorArray class is the basic storage for cross platform pixel data or color data such as a color lookup table (e.g., a palette in Windows and OS/2).
Constructors & DestructorUse these functions to create and destroy instances of this class.
![]() |
public:
virtual ~IRGBAColorArray()
This function destroys the IRGBAColorArray.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
This function constructs an instance of this class.
public:
IRGBAColorArray(unsigned long numberOfColors = 256)
Constructs a color array with the specified number of colors.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IRGBAColorArray(const IRGBAColorArray& source)
This function is the copy constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Accessing the Color DataUse these functions to access and manipulate the color data.
![]() |
public:
IBaseColor color(unsigned long i) const
Returns the color of the specified index in the color array.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
unsigned long numberOfColors() const
Returns the size of the color array.
| IGraphicException | if the index is invalid |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Index operator to facilitate access to the data structure by subclasses.
public:
const IR8G8B8A8Color& operator [](unsigned long i) const
This version of the index operator is used when the color array is a const object.
| IGraphicException | if the index is invalid |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IR8G8B8A8Color& operator [](unsigned long i)
This version of the index operator is used when the color array is non-const.
| IGraphicException | if the index is invalid |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual void setColor(unsigned long i, const IBaseColor& p)
Sets the color of the specified index in the color array.
| IGraphicException | if the index is invalid |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
IR8G8B8A8Color* fColors
A pointer to the 8-bit color structure.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
unsigned long fNumberOfColors
The size of the fColors color array.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Assignment and Equality OperatorsUse these operator functions to handle color array assignment and equality tests.
![]() |
public:
IRGBAColorArray& operator =(const IRGBAColorArray& Src)
Assignment operator.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual bool operator ==(const IRGBAColorArray&) const
Tests the two color arrays for equality.
This function returns true if the two color arrays have the same depth and all color cells are equal.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Color Array OwnershipUse these functions to adopt and relinquish control of a color data array.
![]() |
public:
virtual void adoptColorArray( unsigned long size, IR8G8B8A8Color* colorArrayToAdopt )
Assume ownership of the allocation of a new color array data allocation.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IR8G8B8A8Color* orphanColorArray()
Relinquishes knowledge of, and responsibility for, the color array, returning it to the caller. The function returns a pointer to the color array data that was orphaned.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Streaming SupportUse these functions to enable streaming of color data.
![]() |
public:
IDataStream& operator <<=(IDataStream& fromWhere)
This function supports streaming in the color array data.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IDataStream& operator >>=(IDataStream& toWhere) const
This function supports streaming out the color array data.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |