Program Listing for File palette.h¶
↰ Return to documentation for file (src/core/palette.h
)
/*
* Palette - Stores information about a color palette.
*/
#ifndef PALETTE_H
#define PALETTE_H
#include <stdlib.h>
#include "colors.h"
namespace PixelMaestro {
class Palette {
public:
Palette(const Colors::RGB colors[], uint8_t size);
Palette(const Palette& other);
Palette& operator=(const Palette& other);
~Palette();
Colors::RGB& get_color_at_index(uint8_t index) const;
Colors::RGB* get_colors() const;
uint8_t get_num_colors() const;
void set_colors(const Colors::RGB colors[], uint8_t num_colors);
private:
Colors::RGB* colors_ = nullptr;
uint8_t num_colors_ = 0;
};
}
#endif // PALETTE_H