Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Attributes | List of all members
GPalette Class Reference

`#include <gPalette.h>`

## Public Types
enum | PaletteType { RGB, RGBA }

## Public Member Functions
| GPalette ()
virtual | ~GPalette ()
PaletteType | getPaletteType () const
void | setPaletteType (const PaletteType pt)
const ColorI * | getColors () const
ColorI * | getColors ()
const ColorI & | getColor (const U32 in_index) const
ColorI & | getColor (const U32 in_index)
bool | readMSPalette (Stream &io_rStream)
bool | readMSPalette (const char *in_pFileName)
bool | writeMSPalette (Stream &io_rStream) const
bool | writeMSPalette (const char *in_pFileName) const
bool | read (Stream &io_rStream)
bool | write (Stream &io_rStream) const

## Protected Attributes
PaletteType | m_paletteType
ColorI | m_pColors [256]

## Member Enumeration Documentation

enum PaletteType

Enumerator
RGB |
RGBA |

## Constructor & Destructor Documentation

GPalette | ( |  | ) |

~GPalette | ( |  | ) |
| virtual

## Member Function Documentation

const ColorI & getColor | ( | const U32 | in_index | ) | const
| inline

ColorI & getColor | ( | const U32 | in_index | ) |
| inline

const ColorI * getColors | ( |  | ) | const
| inline

ColorI * getColors | ( |  | ) |
| inline

GPalette::PaletteType getPaletteType | ( |  | ) | const
| inline

bool read | ( | Stream & | io_rStream | ) |

bool readMSPalette | ( | Stream & | io_rStream | ) |

bool readMSPalette | ( | const char * | in_pFileName | ) |

void setPaletteType | ( | const PaletteType | pt | ) |
| inline

bool write | ( | Stream & | io_rStream | ) | const

bool writeMSPalette | ( | Stream & | io_rStream | ) | const

bool writeMSPalette | ( | const char * | in_pFileName | ) | const

## Member Data Documentation

PaletteType m_paletteType
| protected

ColorI m_pColors[256]
| protected

The documentation for this class was generated from the following files:

- graphics/gPalette.h
- graphics/gPalette.cc