Class encapsulating color information in preferred GL format - an array of four unsigned bytes.
Color index is also cached for easier interfacing with the traditional ROOT graphics.
Public Member Functions | |
| TGLColor () | |
| Default constructor. Color is initialized to black.   | |
| TGLColor (Color_t color_index, Char_t transparency=0) | |
| Constructor from color-index and transparency.   | |
| TGLColor (const TGLColor &c) | |
| copy constructor   | |
| TGLColor (Float_t r, Float_t g, Float_t b, Float_t a=1) | |
| Constructor from Float_t values.   | |
| TGLColor (Int_t r, Int_t g, Int_t b, Int_t a=255) | |
| Constructor from Int_t values.   | |
| UChar_t * | Arr () | 
| TString | AsString () const | 
| Return string describing the color.   | |
| const UChar_t * | CArr () const | 
| UChar_t | GetAlpha () const | 
| UChar_t | GetBlue () const | 
| Color_t | GetColorIndex () const | 
| Returns color-index representing the color.   | |
| UChar_t | GetGreen () const | 
| UChar_t | GetRed () const | 
| Char_t | GetTransparency () const | 
| Returns transparency value.   | |
| TClass * | IsA () const | 
| TGLColor & | operator= (const TGLColor &c) | 
| Assignment operator.   | |
| void | SetAlpha (Int_t v) | 
| void | SetBlue (Int_t v) | 
| void | SetColor (Color_t color_index) | 
| Set color by color-index.   | |
| void | SetColor (Color_t color_index, Char_t transparency) | 
| Set color by color-index and alpha from the transparency.   | |
| void | SetColor (Float_t r, Float_t g, Float_t b, Float_t a=1) | 
| Set color with Float_t values.   | |
| void | SetColor (Int_t r, Int_t g, Int_t b, Int_t a=255) | 
| Set color with Int_t values.   | |
| void | SetGreen (Int_t v) | 
| void | SetRed (Int_t v) | 
| void | SetTransparency (Char_t transparency) | 
| Set alpha from the transparency.   | |
| void | Streamer (TBuffer &) | 
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) | 
Static Public Member Functions | |
| static TClass * | Class () | 
| static const char * | Class_Name () | 
| static constexpr Version_t | Class_Version () | 
| static const char * | DeclFileName () | 
Protected Attributes | |
| Short_t | fIndex | 
| UChar_t | fRGBA [4] | 
#include <TGLUtil.h>
| TGLColor::TGLColor | ( | ) | 
Default constructor. Color is initialized to black.
Definition at line 1158 of file TGLUtil.cxx.
Constructor from Int_t values.
Definition at line 1168 of file TGLUtil.cxx.
Constructor from Float_t values.
Definition at line 1176 of file TGLUtil.cxx.
Constructor from color-index and transparency.
Definition at line 1184 of file TGLUtil.cxx.
| TGLColor::TGLColor | ( | const TGLColor & | c | ) | 
copy constructor
Definition at line 1192 of file TGLUtil.cxx.
| TString TGLColor::AsString | ( | ) | const | 
Return string describing the color.
Definition at line 1320 of file TGLUtil.cxx.
      
  | 
  static | 
      
  | 
  inlinestaticconstexpr | 
      
  | 
  inlinestatic | 
| Color_t TGLColor::GetColorIndex | ( | ) | const | 
Returns color-index representing the color.
Definition at line 1217 of file TGLUtil.cxx.
| Char_t TGLColor::GetTransparency | ( | ) | const | 
Returns transparency value.
Definition at line 1227 of file TGLUtil.cxx.
      
  | 
  inline | 
Assignment operator.
Definition at line 1204 of file TGLUtil.cxx.
| void TGLColor::SetColor | ( | Color_t | color_index | ) | 
Set color by color-index.
Alpha is not changed. If color_index is not valid, color is set to magenta.
Definition at line 1260 of file TGLUtil.cxx.
Set color by color-index and alpha from the transparency.
If color_index is not valid, color is set to magenta.
Definition at line 1284 of file TGLUtil.cxx.
Set color with Float_t values.
Definition at line 1247 of file TGLUtil.cxx.
Set color with Int_t values.
Definition at line 1235 of file TGLUtil.cxx.
| void TGLColor::SetTransparency | ( | Char_t | transparency | ) | 
Set alpha from the transparency.
Definition at line 1312 of file TGLUtil.cxx.
| void TGLColor::Streamer | ( | TBuffer & | ) | 
      
  | 
  inline |