00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TColorWheel
00013 #define ROOT_TColorWheel
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027
00028 class TCanvas;
00029 class TArc;
00030 class TLine;
00031 class TText;
00032 class TGraph;
00033
00034 class TColorWheel : public TNamed {
00035
00036 private:
00037 Double_t fRmin;
00038 Double_t fRmax;
00039 Double_t fR0;
00040 Double_t fDr;
00041 Double_t fRgray;
00042 Double_t fX[15];
00043 Double_t fY[15];
00044 TCanvas *fCanvas;
00045 TArc *fArc;
00046 TLine *fLine;
00047 TText *fText;
00048 TGraph *fGraph;
00049
00050 TColorWheel(const TColorWheel &org);
00051 TColorWheel &operator=(const TColorWheel &rhs);
00052
00053 protected:
00054 Int_t InCircles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const;
00055 Int_t InGray(Double_t x, Double_t y) const;
00056 Int_t InRectangles(Double_t x, Double_t y, Int_t coffset, Double_t angle) const;
00057 void PaintCircle(Int_t coffset,Int_t n,Double_t x, Double_t y, Double_t ang) const;
00058 void PaintCircles(Int_t coffset, Double_t angle) const ;
00059 void PaintGray() const;
00060 void PaintRectangles(Int_t coffset, Double_t angle) const;
00061 void Rotate(Double_t x, Double_t y, Double_t &u, Double_t &v, Double_t ang) const;
00062
00063 public:
00064 TColorWheel();
00065 virtual ~TColorWheel();
00066 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00067 virtual void Draw(Option_t *option="");
00068 TCanvas *GetCanvas() const {return fCanvas;}
00069 virtual Int_t GetColor(Int_t px, Int_t py) const;
00070 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00071 virtual void Paint(Option_t *option="");
00072 virtual void SetCanvas(TCanvas *can) {fCanvas = can;}
00073
00074 ClassDef(TColorWheel,1)
00075 };
00076
00077 #endif
00078