ROOT logo
ROOT » CORE » BASE » TColorGradient

class TColorGradient: public TColor


TColorGradient

TColorGradient extends basic TColor.
Actually, this is not a simple color, but linear gradient + shadow
for filled area. By inheriting from TColor, gradients can be placed
inside gROOT's list of colors and use it in all TAttXXX descendants
without modifying any existing code.
Shadow, of course, is not a property of any color, and gradient is
not, but this is the best way to add new attributes to filled area
without re-writing all the graphics code.


Function Members (Methods)

public:
TColorGradient(const TColorGradient&)
~TColorGradient()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
const char*TColor::AsHexString() const
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTColor::Copy(TObject& color) const
static voidTColor::CreateColorsCircle(Int_t offset, const char* name, UChar_t* rgb)
static voidTColor::CreateColorsGray()
static voidTColor::CreateColorsRectangle(Int_t offset, const char* name, UChar_t* rgb)
static voidTColor::CreateColorWheel()
static Int_tTColor::CreateGradientColorTable(UInt_t Number, Double_t* Stops, Double_t* Red, Double_t* Green, Double_t* Blue, UInt_t NColors, Float_t alpha = 1.)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Float_tTColor::GetAlpha() const
Float_tTColor::GetBlue() const
static Int_tTColor::GetColor(const char* hexcolor)
static Int_tTColor::GetColor(ULong_t pixel)
static Int_tTColor::GetColor(Float_t r, Float_t g, Float_t b)
static Int_tTColor::GetColor(Int_t r, Int_t g, Int_t b)
static Int_tTColor::GetColorBright(Int_t color)
static Int_tTColor::GetColorDark(Int_t color)
static Int_tTColor::GetColorPalette(Int_t i)
const Double_t*GetColorPositions() const
const Double_t*GetColors() const
static Int_tTColor::GetColorTransparent(Int_t color, Float_t a)
TColorGradient::ECoordinateModeGetCoordinateMode() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Float_tTColor::GetGrayscale() const
Float_tTColor::GetGreen() const
virtual voidTColor::GetHLS(Float_t& h, Float_t& l, Float_t& s) const
Float_tTColor::GetHue() const
virtual const char*TObject::GetIconName() const
Float_tTColor::GetLight() const
virtual const char*TNamed::GetName() const
Int_tTColor::GetNumber() const
static Int_tTColor::GetNumberOfColors()
TColorGradient::SizeType_tGetNumberOfSteps() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
ULong_tTColor::GetPixel() const
Float_tTColor::GetRed() const
virtual voidTColor::GetRGB(Float_t& r, Float_t& g, Float_t& b) const
Float_tTColor::GetSaturation() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
static voidTColor::HLS2RGB(Float_t h, Float_t l, Float_t s, Float_t& r, Float_t& g, Float_t& b)
static voidTColor::HLS2RGB(Int_t h, Int_t l, Int_t s, Int_t& r, Int_t& g, Int_t& b)
static voidTColor::HLStoRGB(Float_t h, Float_t l, Float_t s, Float_t& r, Float_t& g, Float_t& b)
static voidTColor::HSV2RGB(Float_t h, Float_t s, Float_t v, Float_t& r, Float_t& g, Float_t& b)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
static voidTColor::InitializeColors()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
static Bool_tTColor::IsGrayscale()
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTColor::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static ULong_tTColor::Number2Pixel(Int_t ci)
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TColorGradient&operator=(const TColorGradient&)
virtual voidTObject::Paint(Option_t* option = "")
static voidTColor::Pixel2RGB(ULong_t pixel, Int_t& r, Int_t& g, Int_t& b)
static voidTColor::Pixel2RGB(ULong_t pixel, Float_t& r, Float_t& g, Float_t& b)
static const char*TColor::PixelAsHexString(ULong_t pixel)
virtual voidTObject::Pop()
virtual voidTColor::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidResetColor(UInt_t nPoints, const Double_t* points, const Color_t* colorIndices)
voidResetColor(UInt_t nPoints, const Double_t* points, const Double_t* colorIndices)
static voidTColor::RGB2HLS(Float_t r, Float_t g, Float_t b, Float_t& h, Float_t& l, Float_t& s)
static voidTColor::RGB2HLS(Int_t r, Int_t g, Int_t b, Int_t& h, Int_t& l, Int_t& s)
static voidTColor::RGB2HSV(Float_t r, Float_t g, Float_t b, Float_t& h, Float_t& s, Float_t& v)
static ULong_tTColor::RGB2Pixel(Int_t r, Int_t g, Int_t b)
static ULong_tTColor::RGB2Pixel(Float_t r, Float_t g, Float_t b)
static voidTColor::RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t& h, Float_t& l, Float_t& s)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
static voidTColor::SaveColor(ostream& out, Int_t ci)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTColor::SetAlpha(Float_t a)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCoordinateMode(TColorGradient::ECoordinateMode mode)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTColor::SetGrayscale(Bool_t set = kTRUE)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
static voidTColor::SetPalette(Int_t ncolors, Int_t* colors, Float_t alpha = 1.)
virtual voidTColor::SetRGB(Float_t r, Float_t g, Float_t b)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
TColorGradient()
TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t* points, const Color_t* colorIndices, TColorGradient::ECoordinateMode mode = kObjectBoundingMode)
TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t* points, const Double_t* colors, TColorGradient::ECoordinateMode mode = kObjectBoundingMode)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidRegisterColor(Color_t colorIndex)

Data Members

public:
enum ECoordinateMode { kPadMode
kObjectBoundingMode
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
Int_tTColor::fNumberColor number identifier
TStringTNamed::fTitleobject title
private:
vector<Double_t>fColorPositions
vector<Double_t>fColorsRGBA values.
TColorGradient::ECoordinateModefCoordinateMode

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TColorGradient()
TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t* points, const Color_t* colorIndices, TColorGradient::ECoordinateMode mode = kObjectBoundingMode)
I have no way to validate parameters here, so it's up to user
to pass correct arguments.
TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t* points, const Double_t* colors, TColorGradient::ECoordinateMode mode = kObjectBoundingMode)
I have no way to validate parameters here, so it's up to user
to pass correct arguments.
void ResetColor(UInt_t nPoints, const Double_t* points, const Color_t* colorIndices)
void ResetColor(UInt_t nPoints, const Double_t* points, const Double_t* colorIndices)
void SetCoordinateMode(TColorGradient::ECoordinateMode mode)
const Double_t * GetColorPositions() const
const Double_t * GetColors() const
void RegisterColor(Color_t colorIndex)
TColorGradient()
ECoordinateMode GetCoordinateMode() const
SizeType_t GetNumberOfSteps() const