TColor


class description - source file - inheritance tree

class TColor : public TNamed


    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) Float_t HLStoRGB1(Float_t rn1, Float_t rn2, Float_t huei) 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 SetNumber(Int_t number) 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

Class Description

*-*-*-*-*-*-*-*-*-*-*-*-* C O L O R class *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =================
  At initialisation time, a table of colors is generated when
  the first Canvas constructor is called.
  This linked list can be accessed from the ROOT object
      (see TROOT::GetListOfColors).
  When a color is defined, 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()
*-*-*-*-*-*-*-*-*-*-*Color default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================

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

~TColor()
*-*-*-*-*-*-*-*-*-*-*Color default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

TColor(const TColor &color)

void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*Copy this color to color*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

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*-*-*-*-*-*-*
*-*            ===============================================



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
               void SetNumber(Int_t number)
            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.2 2000/12/13 15:13:45 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.