class TColorWheel: public TNamed


TColorWheel : Draw the ROOT Color Wheel.

The wheel contains the recommended 216 colors to be used in web applications. The colors in the Color Wheel are created by TColor::CreateColorWheel.

Using this color set for your text, background or graphics will give your application a consistent appearance across different platforms and browsers.

Colors are grouped by hue, the aspect most important in human perception Touching color chips have the same hue, but with different brightness and vividness.

Colors of slightly different hues clash. If you intend to display colors of the same hue together, you should pick them from the same group.

Each color chip is identified by a mnemonic (eg kYellow) and a number. The keywords, kRed, kBlue, kYellow, kPink, etc are defined in the header file Rtypes.h that is included in all ROOT other header files. We strongly recommend to use these keywords in your code instead of hardcoded color numbers, eg:

   myObject.SetFillColor(kRed);
   myObject.SetFillColor(kYellow-10);
   myLine.SetLineColor(kMagenta+2);
output of MACRO_TColorWheel_1_wheel
{
   TColorWheel *w = new TColorWheel();
   w->Draw();
   return w->GetCanvas();
}
 

Function Members (Methods)

public:
TColorWheel()
virtual~TColorWheel()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
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 voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(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
TCanvas*GetCanvas() const
virtual Int_tGetColor(Int_t px, Int_t py) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
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
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
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
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)
virtual voidPaint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetCanvas(TCanvas* can)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tInCircles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const
Int_tInGray(Double_t x, Double_t y) const
Int_tInRectangles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const
voidTObject::MakeZombie()
voidPaintCircle(Int_t coffset, Int_t n, Double_t x, Double_t y, Double_t ang) const
voidPaintCircles(Int_t coffset, Double_t angle) const
voidPaintGray() const
voidPaintRectangles(Int_t coffset, Double_t angle) const
voidRotate(Double_t x, Double_t y, Double_t& u, Double_t& v, Double_t ang) const
private:
TColorWheel(const TColorWheel& org)
TColorWheel&operator=(const TColorWheel& rhs)

Data Members

public:
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
TStringTNamed::fTitleobject title
private:
TArc*fArc! pointer to utility arc
TCanvas*fCanvas! Canvas used to draw the Color Wheel
Double_tfDrCircles radius
TGraph*fGraph! pointer to utility graph
TLine*fLine! pointer to utility line
Double_tfR0Minimum radius for circles
Double_tfRgrayMaximum radius of gray circle
Double_tfRmaxMaximum radius for rectangles
Double_tfRminMinimum radius for rectangles
TText*fText! pointer to utility text
Double_tfX[15]X coordinates of the center of circles
Double_tfY[15]Y coordinates of the center of circles

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TColorWheel(const TColorWheel& org)
 constructor
~TColorWheel()
 destructor
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 always return the color wheel
void Draw(Option_t* option = "")
 Paint the color wheel
Int_t GetColor(Int_t px, Int_t py) const
 Return the color number pointed by the mouse
char * GetObjectInfo(Int_t px, Int_t py) const
 Return the color number pointed by the mouse
Int_t InCircles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const
 Return the color number when the mouse point to a circle
Int_t InGray(Double_t x, Double_t y) const
 Return the color number when the mouse point to the gray circle
Int_t InRectangles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const
 Return the color number when the mouse point to a rectangle
void Paint(Option_t* option = "")
 Paint the color wheel
void PaintCircle(Int_t coffset, Int_t n, Double_t x, Double_t y, Double_t ang) const
 Draw one color of type circle
void PaintCircles(Int_t coffset, Double_t angle) const
 Draw all colors of type circle
void PaintRectangles(Int_t coffset, Double_t angle) const
 Draw all colors of type rectangle
void PaintGray()
 Draw the gray colors + white + black
void Rotate(Double_t x, Double_t y, Double_t& u, Double_t& v, Double_t ang) const
 Rotate point x,y with an angle=ang
TColorWheel(const TColorWheel& org)
TColorWheel & operator=(const TColorWheel& rhs)
TCanvas * GetCanvas()
{return fCanvas;}
void SetCanvas(TCanvas* can)
{fCanvas = can;}

Author: Rene Brun 10/03/2007
Last change: root/gpad:$Id: TColorWheel.h 20882 2007-11-19 11:31:26Z rdm $
Last generated: 2008-06-25 08:35
Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *

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.