Inheritance diagram for CP_Palette:
Public Member Functions | |
virtual | ~CP_Palette () throw () |
Destructor. | |
Constructor / Destructor | |
CP_Palette () | |
Constructor. | |
CP_Palette (UInt16 inNumberColors, bool inWantSystemDefault=true, bool inWantBW=false) | |
CP_Palette (SInt32 inCLUTResourceID) | |
Converters | |
UInt32 | BitDepthToNumberColors (SInt16 inBitDepth) |
SInt16 | NumberColorsToBitDepth (UInt32 inNumberColors) |
Getters | |
SInt16 | GetCount () const |
CP_RGBColor | GetColorEntry (SInt16 inIndex) const |
SInt16 | GetColorIndex (const CP_RGBColor &inColor) |
Setters | |
void | SetColorEntry (SInt16 inIndex, const CP_RGBColor &inColor) |
Constructor / Destructor | |
CP_Palette (CTabHandle inColorTable) | |
Constructor. | |
Getters | |
CTabHandle | GetColorTable () |
Constructor / Destructor | |
CP_Palette (SInt32 *inColorTable, SInt16 inNumberColors) | |
Constructor. | |
Getters | |
HPALETTE | GetColorTable () |
Protected Attributes | |
CTabHandle | fColorTable |
bool | fFromSystem |
HPALETTE | fColorTable |
LPLOGPALETTE | fLogPalette |
char * | fColorTable |
Private Member Functions | |
Misc | |
void | MakeMacOSColorTable (UInt16 inNumberColors) |
Misc | |
bool | LoadCLUT (SInt32 inCLUTResourceID) |
void | CreateDefaultWinPalette (UInt16 inBitDepth) |
|
Constructor.
|
|
Constructor.
|
|
Constructor.
|
|
Destructor.
|
|
Linux color table. |
|
Constructor.
|
|
Return the number of colors available in the palette for the passed in bit depth.
|
|
Return the bit depth based upon the passed in number of colors.
|
|
Return a count of the number of colors in this palette.
|
|
Return a CP_RGBColor for the passed in palette index. If the passed in index is not valid, then the first or last entry is returned, depending on if the index is less than 1 or greater than the number of entries.
|
|
Return the palette index for a given color. If there are more than 1 color with the same values, then the first one is returned. If the color can't be found, then 0 is returned.
|
|
Set a color entry for the palette.
|
|
Return a MacOS CTabHandle containing the colors in the palette. |
|
Make an empty MacOS CTabHandle color table for use in this object. All colors will be set to 0.
|
|
Return the Windows color table. |
|
Private routine to load the colors from a CLUT resource under Windows.
|
|
Creates a default Windows palettes of the passed in bit depth.
|
|
Add a reference to our object, returning the new reference count.
|
|
Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.
|
|
Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.
|
|
Returns the current ref count.
|
|
|
|
A MacOS CTabHandle containing the colors. |
|
A MacOS CTabHandle containing the colors. |
|
Windows color table. |
|
Window palette. |