blob: 82cd3c42e75d304ab2e8668f7c191e22a6916bd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <array>
namespace mbgl {
// Stores a premultiplied color, with all four channels ranging from 0..1
class Color {
public:
float r = 0.0f;
float g = 0.0f;
float b = 0.0f;
float a = 0.0f;
};
inline bool operator== (const Color& colorA, const Color& colorB) {
return colorA.r == colorB.r && colorA.g == colorB.g && colorA.b == colorB.b && colorA.a == colorB.a;
}
inline bool operator!= (const Color& colorA, const Color& colorB) {
return !(colorA.r == colorB.r && colorA.g == colorB.g && colorA.b == colorB.b && colorA.a == colorB.a);
}
} // namespace mbgl
|