![Logo](tetiere_ht.jpg) |
DATAKIT API
V2025.1
|
|
Go to the documentation of this file. 1 #ifndef __DTK_RGB_HPP__
2 #define __DTK_RGB_HPP__
17 Dtk_RGB(
int r,
int g,
int b,
int a = -1,
int inIndexReader = -1 );
28 inline bool HasColor()
const {
return _RGBA[0] >= 0;}
30 inline bool HasAlpha()
const {
return _RGBA[3] >= 0;}
32 inline bool IsFilled()
const {
return (_RGBA[0] >= 0 || _RGBA[3] >= 0);}
34 inline int &
R() {
return _RGBA[0];}
35 inline const int &
R()
const {
return _RGBA[0];}
37 inline int &
G() {
return _RGBA[1];}
38 inline const int &
G()
const {
return _RGBA[1];}
40 inline int &
B() {
return _RGBA[2];}
41 inline const int &
B()
const {
return _RGBA[2];}
43 inline int &
A() {
return _RGBA[3];}
44 inline const int &
A()
const {
return _RGBA[3];}
49 inline void SetRGBA(
const int& inRed,
const int& inGreen,
const int& inBlue,
const int& inAlpha = -1)
57 inline void GetRGB(
int& outRed,
int& outGreen,
int& outBlue)
63 inline void GetRGBA(
int& outRed,
int& outGreen,
int& outBlue,
int& outAlpha)
65 GetRGB(outRed, outGreen, outBlue);
int & G()
Definition: dtk_rgb.hpp:37
friend bool operator>=(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
const int & G() const
Definition: dtk_rgb.hpp:38
int & R()
Definition: dtk_rgb.hpp:34
void SetRGBA(const int &inRed, const int &inGreen, const int &inBlue, const int &inAlpha=-1)
Definition: dtk_rgb.hpp:49
friend bool operator>(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
void GetRGB(int &outRed, int &outGreen, int &outBlue)
Definition: dtk_rgb.hpp:57
int & IndexReader()
Definition: dtk_rgb.hpp:46
Dtk_RGB & operator=(const Dtk_RGB &s)
friend bool operator<(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
char Dtk_bool
Definition: define.h:725
const int & B() const
Definition: dtk_rgb.hpp:41
friend bool operator<=(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
int & A()
Definition: dtk_rgb.hpp:43
friend bool operator==(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
Dtk_RGB(int r, int g, int b, int a=-1, int inIndexReader=-1)
bool HasAlpha() const
Definition: dtk_rgb.hpp:30
friend bool operator!=(const Dtk_RGB &lhs, const Dtk_RGB &rhs)
bool IsFilled() const
Definition: dtk_rgb.hpp:32
int & B()
Definition: dtk_rgb.hpp:40
Dtk_RGB(const Dtk_RGB &s)
const int & IndexReader() const
Definition: dtk_rgb.hpp:47
int & operator[](int pos)
void Clear()
Definition: dtk_rgb.hpp:21
void GetRGBA(int &outRed, int &outGreen, int &outBlue, int &outAlpha)
Definition: dtk_rgb.hpp:63
bool HasColor() const
Definition: dtk_rgb.hpp:28
Definition: dtk_rgb.hpp:7
const int & A() const
Definition: dtk_rgb.hpp:44
const int & R() const
Definition: dtk_rgb.hpp:35