LIBPOLYMNIA
rgb.h
[詳解]
1 /**********************************************************************//*
9  * (c) 2001-2016 oZ/acy. ALL RIGHTS RESERVED.
10  */
11 #ifndef INC_POLYMNIA_RGBCOL_H___
12 #define INC_POLYMNIA_RGBCOL_H___
13 
14 #include <themis/inttype.h>
15 
16 namespace polymnia
17 {
21 class RgbColor
22 {
23 public:
24  themis::Byte r;
25  themis::Byte g;
26  themis::Byte b;
27 
28 public:
32  constexpr RgbColor() noexcept : r(0), g(0), b(0) {}
33 
37  constexpr
38  RgbColor(themis::Byte r0, themis::Byte g0, themis::Byte b0) noexcept
39  : r(r0), g(g0), b(b0)
40  {}
41 
43  bool operator==(const RgbColor& other) const noexcept
44  {
45  return r == other.r && g == other.g && b == other.b;
46  }
47 
49  bool operator!=(const RgbColor& other) const noexcept
50  {
51  return !(*this == other);
52  }
53 };
54 
55 
56 }//end of namespace polymnia
57 
58 
59 #endif // INC_POLYMNIA_RGBCOL_H___
constexpr RgbColor(themis::Byte r0, themis::Byte g0, themis::Byte b0) noexcept
構築子
Definition: rgb.h:38
RGB24bit色情報クラス
Definition: rgb.h:21
Definition: dibio.h:20
bool operator!=(const RgbColor &other) const noexcept
非等値比較演算子
Definition: rgb.h:49
bool operator==(const RgbColor &other) const noexcept
等値比較演算子
Definition: rgb.h:43
themis::Byte r
赤要素
Definition: rgb.h:24
constexpr RgbColor() noexcept
構築子
Definition: rgb.h:32
themis::Byte g
緑要素
Definition: rgb.h:25
themis::Byte b
青要素
Definition: rgb.h:26