TColor


class description - source file - inheritance tree

class TColor : public TNamed

    private:
void Allocate() Float_t HLStoRGB1(Float_t rn1, Float_t rn2, Float_t huei) public:
TColor TColor() TColor TColor(Int_t color, Float_t r, Float_t g, Float_t b, const char* name) TColor TColor(const TColor& color) virtual void ~TColor() static TClass* Class() virtual void Copy(TObject& color) Float_t GetBlue() const Float_t GetGreen() const virtual void GetHLS(Float_t& h, Float_t& l, Float_t& s) const Float_t GetHue() const Float_t GetLight() const Int_t GetNumber() const Float_t GetRed() const virtual void GetRGB(Float_t& r, Float_t& g, Float_t& b) const Float_t GetSaturation() const virtual void HLStoRGB(Float_t h, Float_t l, Float_t s, Float_t& r, Float_t& g, Float_t& b) virtual TClass* IsA() const virtual void ls(Option_t* option) const virtual void Print(Option_t* option) const virtual void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t& h, Float_t& l, Float_t& s) virtual void SetRGB(Float_t r, Float_t g, Float_t b) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
Int_t fNumber Color number identifier Float_t fRed Fraction of Red Float_t fGreen Fraction of Green Float_t fBlue Fraction of Blue Float_t fHue Hue Float_t fLight Light Float_t fSaturation Saturation protected:
public:

Class Description

                                                                      
 TColor                                                               
                                                                      
 Color defined by RGB or HLS.                                         
 At initialization time, a table of colors is generated. This linked  
 list can be accessed from the ROOT object                            
 (see TROOT::GetListOfColors()). When a color is defined in the range 
 of [1,50], two "companion" colors are also defined:                  
    - the dark version (color_index + 100)                            
    - the bright version (color_index + 150)                          
 The dark and bright color are used to give 3-D effects when drawing  
 various boxes (see TWbox, TPave, TPaveText, TPaveLabel,etc).         
                                                                      
 This is the list of currently supported basic colors (here dark and  
 bright colors are not shown).                                        

/*

*/

                                                                      


TColor(): TNamed()
 Default ctor.

TColor(Int_t color, Float_t r, Float_t g, Float_t b, const char *name) : TNamed(name,"")
 Normal color constructor. Initialize a color structure.
 Compute the RGB and HLS parameters

~TColor()
 Color destructor.

TColor(const TColor &color)
 Color copy ctor.

void Copy(TObject &obj)
 Copy this color to obj.

void HLStoRGB(Float_t hue, Float_t light, Float_t satur, Float_t &r, Float_t &g, Float_t &b)
 Compute HLS from RGB (see HIGZ routine IGHTOR).

Float_t HLStoRGB1(Float_t rn1, Float_t rn2, Float_t huei)
 Auxiliary to HLStoRGB (see HIGZ routine IGHR01).

void ls(Option_t *) const
 List this color with its attributes.

void Print(Option_t *) const
 Dump this color with its attributes.

void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &hue, Float_t &light, Float_t &satur )
 Compute HLS from RGB.

void SetRGB(Float_t r, Float_t g, Float_t b)
 Initialize this color and its assosiated colors.

void Allocate()
 Make this color known to the graphics system.



Inline Functions


               void GetRGB(Float_t& r, Float_t& g, Float_t& b) const
               void GetHLS(Float_t& h, Float_t& l, Float_t& s) const
              Int_t GetNumber() const
            Float_t GetRed() const
            Float_t GetGreen() const
            Float_t GetBlue() const
            Float_t GetHue() const
            Float_t GetLight() const
            Float_t GetSaturation() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)


Author: Rene Brun 12/12/94
Last update: root/base:$Name: $:$Id: TColor.cxx,v 1.6 2001/05/09 13:28:55 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.