DATAKIT SDK  V2026.4
Dtk_RGB Class Reference

Public Member Functions

int & A ()
 
const int & A () const
 
int & B ()
 
const int & B () const
 
void Clear ()
 
 Dtk_RGB ()
 
 Dtk_RGB (const Dtk_RGB &s)
 
 Dtk_RGB (Dtk_RGB &&s) DTK_NOEXCEPT
 
 Dtk_RGB (int r, int g, int b, int a=-1, int inIndexReader=-1)
 
 Dtk_RGB (int(&rgb)[3])
 
 Dtk_RGB (int(&rgba)[4])
 
 Dtk_RGB (int(&rgba)[5])
 
int & G ()
 
const int & G () const
 
void GetRGB (int &outRed, int &outGreen, int &outBlue)
 
void GetRGBA (int &outRed, int &outGreen, int &outBlue, int &outAlpha)
 
bool HasAlpha () const
 
bool HasColor () const
 
int & IndexReader ()
 
const int & IndexReader () const
 
bool IsFilled () const
 
Dtk_RGB & operator= (const Dtk_RGB &s)
 
int & operator[] (int pos)
 
const int & operator[] (int pos) const
 
int & R ()
 
const int & R () const
 
void SetRGBA (const int &inRed, const int &inGreen, const int &inBlue, const int &inAlpha=-1)
 
 ~Dtk_RGB ()
 

Constructor & Destructor Documentation

◆ Dtk_RGB() [1/7]

Dtk_RGB::Dtk_RGB ( )

◆ Dtk_RGB() [2/7]

Dtk_RGB::Dtk_RGB ( const Dtk_RGB &  s)

◆ Dtk_RGB() [3/7]

Dtk_RGB::Dtk_RGB ( Dtk_RGB &&  s)

◆ Dtk_RGB() [4/7]

Dtk_RGB::Dtk_RGB ( int  r,
int  g,
int  b,
int  a = -1,
int  inIndexReader = -1 
)

◆ Dtk_RGB() [5/7]

Dtk_RGB::Dtk_RGB ( int(&)  rgba[5])

◆ Dtk_RGB() [6/7]

Dtk_RGB::Dtk_RGB ( int(&)  rgba[4])

◆ Dtk_RGB() [7/7]

Dtk_RGB::Dtk_RGB ( int(&)  rgb[3])

◆ ~Dtk_RGB()

Dtk_RGB::~Dtk_RGB ( )

Member Function Documentation

◆ A() [1/2]

int& Dtk_RGB::A ( )
45 {return _RGBA[3];}

◆ A() [2/2]

const int& Dtk_RGB::A ( ) const
46 {return _RGBA[3];}

◆ B() [1/2]

int& Dtk_RGB::B ( )
42 {return _RGBA[2];}

◆ B() [2/2]

const int& Dtk_RGB::B ( ) const
43 {return _RGBA[2];}

◆ Clear()

void Dtk_RGB::Clear ( )
23 { reset(); }

◆ G() [1/2]

int& Dtk_RGB::G ( )
39 {return _RGBA[1];}

◆ G() [2/2]

const int& Dtk_RGB::G ( ) const
40 {return _RGBA[1];}

◆ GetRGB()

void Dtk_RGB::GetRGB ( int &  outRed,
int &  outGreen,
int &  outBlue 
)
60  {
61  outRed = _RGBA[0];
62  outGreen = _RGBA[1];
63  outBlue = _RGBA[2];
64  }

◆ GetRGBA()

void Dtk_RGB::GetRGBA ( int &  outRed,
int &  outGreen,
int &  outBlue,
int &  outAlpha 
)
66  {
67  GetRGB(outRed, outGreen, outBlue);
68  outAlpha = _RGBA[3];
69  }

◆ HasAlpha()

bool Dtk_RGB::HasAlpha ( ) const
32 { return _RGBA[3] >= 0;}

◆ HasColor()

bool Dtk_RGB::HasColor ( ) const
30 { return _RGBA[0] >= 0;}

◆ IndexReader() [1/2]

int& Dtk_RGB::IndexReader ( )
48 {return _RGBA[4];}

◆ IndexReader() [2/2]

const int& Dtk_RGB::IndexReader ( ) const
49 {return _RGBA[4];}

◆ IsFilled()

bool Dtk_RGB::IsFilled ( ) const
34 { return (_RGBA[0] >= 0 || _RGBA[3] >= 0);}

◆ operator=()

Dtk_RGB& Dtk_RGB::operator= ( const Dtk_RGB &  s)

◆ operator[]() [1/2]

int& Dtk_RGB::operator[] ( int  pos)

◆ operator[]() [2/2]

const int& Dtk_RGB::operator[] ( int  pos) const

◆ R() [1/2]

int& Dtk_RGB::R ( )
36 {return _RGBA[0];}

◆ R() [2/2]

const int& Dtk_RGB::R ( ) const
37 {return _RGBA[0];}

◆ SetRGBA()

void Dtk_RGB::SetRGBA ( const int &  inRed,
const int &  inGreen,
const int &  inBlue,
const int &  inAlpha = -1 
)
52  {
53  _RGBA[0] = inRed;
54  _RGBA[1] = inGreen;
55  _RGBA[2] = inBlue;
56  _RGBA[3] = inAlpha;
57  }
Dtk_RGB::GetRGB
void GetRGB(int &outRed, int &outGreen, int &outBlue)
Definition: dtk_rgb.hpp:59