![]() |
ROOT
6.06/09
Reference Guide
|
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. More... | |
TGLColor (Int_t r, Int_t g, Int_t b, Int_t a=255) | |
Constructor from Int_t values. More... | |
TGLColor (Float_t r, Float_t g, Float_t b, Float_t a=1) | |
Constructor from Float_t values. More... | |
TGLColor (Color_t color_index, Char_t transparency=0) | |
Constructor from color-index and transparency. More... | |
virtual | ~TGLColor () |
Destructor. More... | |
TGLColor & | operator= (const TGLColor &c) |
Assignment operator. More... | |
UChar_t * | Arr () |
const UChar_t * | CArr () const |
UChar_t | GetRed () const |
UChar_t | GetGreen () const |
UChar_t | GetBlue () const |
UChar_t | GetAlpha () const |
Color_t | GetColorIndex () const |
Returns color-index representing the color. More... | |
Char_t | GetTransparency () const |
Returns transparency value. More... | |
void | SetRed (Int_t v) |
void | SetGreen (Int_t v) |
void | SetBlue (Int_t v) |
void | SetAlpha (Int_t v) |
void | SetColor (Int_t r, Int_t g, Int_t b, Int_t a=255) |
Set color with Int_t values. More... | |
void | SetColor (Float_t r, Float_t g, Float_t b, Float_t a=1) |
Set color with Float_t values. More... | |
void | SetColor (Color_t color_index) |
Set color by color-index. More... | |
void | SetColor (Color_t color_index, Char_t transparency) |
Set color by color-index and alpha from the transparency. More... | |
void | SetTransparency (Char_t transparency) |
Set alpha from the transparency. More... | |
TString | AsString () const |
Return string describing the color. More... | |
ClassDef (TGLColor, 0) | |
Protected Attributes | |
UChar_t | fRGBA [4] |
Short_t | fIndex |
#include <TGLUtil.h>
TGLColor::TGLColor | ( | ) |
Default constructor. Color is initialized to black.
Definition at line 1186 of file TGLUtil.cxx.
Constructor from Int_t values.
Definition at line 1196 of file TGLUtil.cxx.
Constructor from Float_t values.
Definition at line 1204 of file TGLUtil.cxx.
Constructor from color-index and transparency.
Definition at line 1212 of file TGLUtil.cxx.
|
virtual |
Destructor.
Definition at line 1220 of file TGLUtil.cxx.
TString TGLColor::AsString | ( | ) | const |
Return string describing the color.
Definition at line 1343 of file TGLUtil.cxx.
|
inline |
Definition at line 803 of file TGLUtil.h.
Referenced by TGLUtil::Color(), TEveCalo3DGL::DrawHighlight(), TEvePolygonSetProjectedGL::DrawHighlight(), TEveCalo2DGL::DrawHighlight(), TGLLogicalShape::DrawHighlight(), TEveCaloLegoGL::DrawHighlight(), and TGLCameraGuide::Render().
TGLColor::ClassDef | ( | TGLColor | , |
0 | |||
) |
|
inline |
Definition at line 807 of file TGLUtil.h.
Referenced by TGLUtil::ColorAlpha().
Color_t TGLColor::GetColorIndex | ( | ) | const |
Returns color-index representing the color.
Definition at line 1240 of file TGLUtil.cxx.
Referenced by TEveCaloLegoGL::DirectDraw(), TEveCaloLegoGL::DrawCells2D(), TGLViewer::PreDraw(), TGLAnnotation::Render(), TGLCameraOverlay::RenderAxis(), TEveCaloLegoOverlay::RenderLogaritmicScales(), TEveCaloLegoOverlay::RenderPaletteScales(), and TGLViewerEditor::SetModel().
|
inline |
Definition at line 806 of file TGLUtil.h.
Referenced by TGLUtil::ColorAlpha().
|
inline |
Definition at line 805 of file TGLUtil.h.
Referenced by TGLUtil::ColorAlpha().
Char_t TGLColor::GetTransparency | ( | ) | const |
Returns transparency value.
Definition at line 1250 of file TGLUtil.cxx.
Assignment operator.
Definition at line 1227 of file TGLUtil.cxx.
Set color with Int_t values.
Definition at line 1258 of file TGLUtil.cxx.
Referenced by TGLViewerEditor::DoClearColor(), TGLViewer::InitSecondaryObjects(), and TGLViewer::SetClearColor().
Set color with Float_t values.
Definition at line 1270 of file TGLUtil.cxx.
Set color by color-index.
Alpha is not changed. If color_index is not valid, color is set to magenta.
Definition at line 1283 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 1307 of file TGLUtil.cxx.
Set alpha from the transparency.
Definition at line 1335 of file TGLUtil.cxx.
|
mutableprotected |
Definition at line 791 of file TGLUtil.h.
Referenced by operator=().
|
protected |
Definition at line 790 of file TGLUtil.h.
Referenced by Arr(), CArr(), and operator=().