12 #ifndef ROOT_TGraphPolargram
13 #define ROOT_TGraphPolargram
20 class TGraphPolargram:
public TNamed,
public TAttText,
public TAttLine {
27 Color_t fPolarLabelColor;
28 Color_t fRadialLabelColor;
31 Double_t fPolarOffset;
32 Double_t fPolarTextSize;
33 Double_t fRadialOffset;
34 Double_t fRadialTextSize;
39 Double_t fTickpolarSize;
41 Font_t fPolarLabelFont;
42 Font_t fRadialLabelFont;
49 TString* fPolarLabels;
51 void Paint(Option_t* options=
"");
52 void PaintRadialDivisions(Bool_t drawaxis);
53 void PaintPolarDivisions(Bool_t noLabels);
54 void ReduceFraction(Int_t Num, Int_t Denom, Int_t &rnum, Int_t &rden);
56 Int_t FindAlign(Double_t angle);
57 Double_t FindTextAngle(Double_t theta);
61 enum { kLabelOrtho = BIT(14)
64 TGraphPolargram(
const char* name, Double_t rmin, Double_t rmax,
65 Double_t tmin, Double_t tmax);
66 TGraphPolargram(
const char* name=
"");
67 virtual ~TGraphPolargram();
69 Color_t GetPolarColorLabel (){
return fPolarLabelColor;};
70 Color_t GetRadialColorLabel (){
return fRadialLabelColor;};
72 Double_t GetAngle() {
return fAxisAngle;};
73 Double_t GetPolarLabelSize() {
return fPolarTextSize;};
74 Double_t GetPolarOffset() {
return fPolarOffset; };
75 Double_t GetRadialLabelSize() {
return fRadialTextSize;};
76 Double_t GetRadialOffset() {
return fRadialOffset; };
77 Double_t GetRMin() {
return fRwrmin;};
78 Double_t GetRMax() {
return fRwrmax;};
79 Double_t GetTickpolarSize() {
return fTickpolarSize;};
80 Double_t GetTMin() {
return fRwtmin;};
81 Double_t GetTMax() {
return fRwtmax;};
83 Font_t GetPolarLabelFont() {
return fPolarLabelFont;};
84 Font_t GetRadialLabelFont() {
return fRadialLabelFont;};
86 Int_t DistancetoPrimitive(Int_t px, Int_t py);
87 Int_t GetNdivPolar() {
return fNdivPol;};
88 Int_t GetNdivRadial() {
return fNdivRad;};
90 Bool_t IsDegree() {
return fDegree;};
91 Bool_t IsRadian() {
return fRadian;};
92 Bool_t IsGrad() {
return fGrad;};
94 void ChangeRangePolar(Double_t tmin, Double_t tmax);
95 void Draw(Option_t* options=
"");
96 void ExecuteEvent(Int_t event, Int_t px, Int_t py);
97 void PaintCircle(Double_t x, Double_t y, Double_t r,
98 Double_t phimin, Double_t phimax, Double_t theta);
99 void SetAxisAngle(Double_t angle = 0);
100 void SetNdivPolar(Int_t Ndiv = 508);
101 void SetNdivRadial(Int_t Ndiv = 508);
102 void SetPolarLabel(Int_t div,
const TString & label);
103 void SetPolarLabelSize(Double_t angularsize = 0.04);
104 void SetPolarLabelColor(Color_t tcolorangular = 1);
105 void SetPolarLabelFont(Font_t tfontangular = 62);
106 void SetPolarOffset(Double_t PolarOffset=0.04);
107 void SetRadialOffset(Double_t RadialOffset=0.025);
108 void SetRadialLabelSize (Double_t radialsize = 0.035);
109 void SetRadialLabelColor(Color_t tcolorradial = 1);
110 void SetRadialLabelFont(Font_t tfontradial = 62);
111 void SetRangePolar(Double_t tmin, Double_t tmax);
112 void SetRangeRadial(Double_t rmin, Double_t rmax);
113 void SetTickpolarSize(Double_t tickpolarsize = 0.02);
119 ClassDef(TGraphPolargram,1);