ROOT » GRAF3D » GL » TGLColor

class TGLColor


 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.

Function Members (Methods)

public:
virtual~TGLColor()
UChar_t*Arr()
TStringAsString() const
const UChar_t*CArr() const
static TClass*Class()
UChar_tGetAlpha() const
UChar_tGetBlue() const
Color_tGetColorIndex() const
UChar_tGetGreen() const
UChar_tGetRed() const
Char_tGetTransparency() const
virtual TClass*IsA() const
TGLColor&operator=(const TGLColor& c)
voidSetAlpha(Int_t v)
voidSetBlue(Int_t v)
voidSetColor(Color_t color_index)
voidSetColor(Color_t color_index, Char_t transparency)
voidSetColor(Int_t r, Int_t g, Int_t b, Int_t a = 255)
voidSetColor(Float_t r, Float_t g, Float_t b, Float_t a = 1)
voidSetGreen(Int_t v)
voidSetRed(Int_t v)
voidSetTransparency(Char_t transparency)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TGLColor()
TGLColor(const TGLColor&)
TGLColor(Color_t color_index, Char_t transparency = 0)
TGLColor(Int_t r, Int_t g, Int_t b, Int_t a = 255)
TGLColor(Float_t r, Float_t g, Float_t b, Float_t a = 1)

Data Members

protected:
Short_tfIndex
UChar_tfRGBA[4]

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLColor()
 Default constructor. Color is initialized to black.
TGLColor(Int_t r, Int_t g, Int_t b, Int_t a = 255)
 Constructor from Int_t values.
TGLColor(Float_t r, Float_t g, Float_t b, Float_t a = 1)
 Constructor from Float_t values.
TGLColor(Color_t color_index, Char_t transparency = 0)
 Constructor from color-index and transparency.
~TGLColor()
 Dectructor.
TGLColor& operator=(const TGLColor& c)
 Assignment operator.
Color_t GetColorIndex() const
 Returns color-index representing the color.
Char_t GetTransparency() const
 Returns transparecy value.
void SetColor(Int_t r, Int_t g, Int_t b, Int_t a = 255)
 Set color with Int_t values.
void SetColor(Float_t r, Float_t g, Float_t b, Float_t a = 1)
 Set color with Float_t values.
void 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.
void SetColor(Color_t color_index, Char_t transparency)
 Set color by color-index and alpha from the transparency.
 If color_index is not valid, color is set to magenta.
void SetTransparency(Char_t transparency)
 Set alpha from the transparency.
TString AsString() const
 Return string describing the color.
const Double_t * CArr() const
{ return fVals; }
Double_t * Arr()
{ return fVals; }
TGLColor()
UChar_t GetRed() const
{ return fRGBA[0]; }
UChar_t GetGreen() const
{ return fRGBA[1]; }
UChar_t GetBlue() const
{ return fRGBA[2]; }
UChar_t GetAlpha() const
{ return fRGBA[3]; }
void SetRed(Int_t v)
{ fRGBA[0] = v; }
void SetGreen(Int_t v)
{ fRGBA[1] = v; }
void SetBlue(Int_t v)
{ fRGBA[2] = v; }
void SetAlpha(Int_t v)
{ fRGBA[3] = v; }