PixelLightAPI
.
|
Color palette (also known as "color index") More...
#include <ImagePalette.h>
Public Member Functions | |
ImagePalette () | |
Constructor. | |
PLGRAPHICS_API | ImagePalette (const ImagePalette &cSource) |
Copy constructor. | |
~ImagePalette () | |
Destructor. | |
PLGRAPHICS_API ImagePalette & | operator= (const ImagePalette &cSource) |
Assignment operator. | |
void | Clear () |
Clear data. | |
PLGRAPHICS_API void | Create (PLCore::uint32 nColors) |
Create palette. | |
PLCore::uint32 | GetNumOfColors () const |
Get number of colors. | |
Color3 | GetColor (PLCore::uint32 nIndex) const |
Get color. | |
PLGRAPHICS_API int | GetColorIndex (const Color3 &cColor) const |
Get index of color. | |
PLGRAPHICS_API void | SetColor (PLCore::uint32 nIndex, const Color3 &cColor) |
Set color. | |
PLCore::uint32 | AddColor (const Color3 &cColor) |
Add color. | |
void | RebuildColorIndex () |
Rebuild color index. | |
PLCore::uint8 * | GetData () const |
Get color palette data. |
Color palette (also known as "color index")
PLGraphics::ImagePalette::ImagePalette | ( | ) | [inline] |
Constructor.
PLGRAPHICS_API PLGraphics::ImagePalette::ImagePalette | ( | const ImagePalette & | cSource | ) |
Copy constructor.
[in] | cSource | Source to copy from |
PLGraphics::ImagePalette::~ImagePalette | ( | ) | [inline] |
Destructor.
PLGRAPHICS_API ImagePalette& PLGraphics::ImagePalette::operator= | ( | const ImagePalette & | cSource | ) |
Assignment operator.
[in] | cSource | Source to copy from |
void PLGraphics::ImagePalette::Clear | ( | ) | [inline] |
Clear data.
PLGRAPHICS_API void PLGraphics::ImagePalette::Create | ( | PLCore::uint32 | nColors | ) |
Create palette.
[in] | nColors | Number of colors |
PLCore::uint32 PLGraphics::ImagePalette::GetNumOfColors | ( | ) | const [inline] |
Get number of colors.
Color3 PLGraphics::ImagePalette::GetColor | ( | PLCore::uint32 | nIndex | ) | const [inline] |
Get color.
[in] | nIndex | Index of color |
PLGRAPHICS_API int PLGraphics::ImagePalette::GetColorIndex | ( | const Color3 & | cColor | ) | const |
Get index of color.
[in] | cColor | Color |
PLGRAPHICS_API void PLGraphics::ImagePalette::SetColor | ( | PLCore::uint32 | nIndex, |
const Color3 & | cColor | ||
) |
Set color.
[in] | nIndex | Index of color |
[in] | cColor | Color |
PLCore::uint32 PLGraphics::ImagePalette::AddColor | ( | const Color3 & | cColor | ) | [inline] |
Add color.
[in] | cColor | Color |
void PLGraphics::ImagePalette::RebuildColorIndex | ( | ) | [inline] |
Rebuild color index.
PLCore::uint8 * PLGraphics::ImagePalette::GetData | ( | ) | const [inline] |
Get color palette data.
|