MCPcopy Create free account
hub / github.com/IENT/YUView / Colormap

Class Colormap

YUViewLib/src/decoder/decoderTarga.cpp:80–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78};
79
80class Colormap
81{
82public:
83 Colormap() = default;
84 Colormap(const int n) : m_color(n) {}
85
86 int size() const { return int(m_color.size()); }
87
88 const color_t &operator[](int i) const { return m_color[i]; }
89
90 color_t &operator[](int i) { return m_color[i]; }
91
92 bool operator==(const Colormap &o) const
93 {
94 for (int i = 0; i < int(m_color.size()); ++i)
95 {
96 if (m_color[i] != o[i])
97 return false;
98 }
99 return true;
100 }
101
102 bool operator!=(const Colormap &o) const { return !operator==(o); }
103
104private:
105 std::vector<color_t> m_color;
106};
107
108struct Header
109{

Callers 1

readColormapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected