ROOT » GRAF2D » GPAD » TColorWheel

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 (e.g. 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, e.g.:

output of htmldoc/MACRO_TColorWheel_1.gif
   TColorWheel *w = new TColorWheel();
   return w->GetCanvas();

Function Members (Methods)

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()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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(ostream& 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) const
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
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
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
TColorWheel&operator=(const TColorWheel& rhs)
TColorWheel(const TColorWheel& org)

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
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

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() const
 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() const
{return fCanvas;}
void SetCanvas(TCanvas* can)
{fCanvas = can;}