Warning, file /include/root/TGraphPolargram.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGraphPolargram
0013 #define ROOT_TGraphPolargram
0014
0015 #include "TAttText.h"
0016 #include "TAttLine.h"
0017 #include "TNamed.h"
0018
0019
0020 class TGraphPolargram: public TNamed, public TAttText, public TAttLine {
0021
0022 private:
0023 Bool_t fRadian;
0024 Bool_t fDegree;
0025 Bool_t fGrad;
0026
0027 Color_t fPolarLabelColor;
0028 Color_t fRadialLabelColor;
0029
0030 Double_t fAxisAngle;
0031 Double_t fPolarOffset;
0032 Double_t fPolarTextSize;
0033 Double_t fRadialOffset;
0034 Double_t fRadialTextSize;
0035 Double_t fRwrmin;
0036 Double_t fRwrmax;
0037 Double_t fRwtmin;
0038 Double_t fRwtmax;
0039 Double_t fTickpolarSize;
0040
0041 Font_t fPolarLabelFont;
0042 Font_t fRadialLabelFont;
0043
0044 Int_t fCutRadial;
0045
0046 Int_t fNdivRad;
0047 Int_t fNdivPol;
0048
0049 TString* fPolarLabels;
0050
0051 void Paint(Option_t* options="") override;
0052 void PaintRadialDivisions(Bool_t drawaxis);
0053 void PaintPolarDivisions(Bool_t noLabels);
0054 void ReduceFraction(Int_t Num, Int_t Denom, Int_t &rnum, Int_t &rden);
0055 void Init();
0056 Int_t FindAlign(Double_t angle);
0057 Double_t FindTextAngle(Double_t theta);
0058
0059 public:
0060
0061 enum { kLabelOrtho = BIT(14)
0062 };
0063
0064 TGraphPolargram(const char* name, Double_t rmin, Double_t rmax,
0065 Double_t tmin, Double_t tmax);
0066 TGraphPolargram(const char* name="");
0067 ~TGraphPolargram() override;
0068
0069 Color_t GetPolarColorLabel() { return fPolarLabelColor;}
0070 Color_t GetRadialColorLabel() { return fRadialLabelColor;}
0071
0072 Double_t GetAngle() { return fAxisAngle;}
0073 Double_t GetPolarLabelSize() {return fPolarTextSize;}
0074 Double_t GetPolarOffset() { return fPolarOffset; }
0075 Double_t GetRadialLabelSize() {return fRadialTextSize; }
0076 Double_t GetRadialOffset() { return fRadialOffset; }
0077 Double_t GetRMin() { return fRwrmin; }
0078 Double_t GetRMax() { return fRwrmax; }
0079 Double_t GetTickpolarSize() {return fTickpolarSize; }
0080 Double_t GetTMin() { return fRwtmin; }
0081 Double_t GetTMax() { return fRwtmax; }
0082
0083 Font_t GetPolarLabelFont() { return fPolarLabelFont; }
0084 Font_t GetRadialLabelFont() { return fRadialLabelFont; }
0085
0086 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0087 Int_t GetNdivPolar() { return fNdivPol; }
0088 Int_t GetNdivRadial() { return fNdivRad; }
0089
0090 Bool_t IsDegree() {return fDegree; }
0091 Bool_t IsRadian() {return fRadian; }
0092 Bool_t IsGrad() {return fGrad; }
0093
0094 void ChangeRangePolar(Double_t tmin, Double_t tmax);
0095 void Draw(Option_t* options="") override;
0096 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0097 void PaintCircle(Double_t x, Double_t y, Double_t r,
0098 Double_t phimin, Double_t phimax, Double_t theta);
0099 void SetAxisAngle(Double_t angle = 0);
0100 void SetNdivPolar(Int_t Ndiv = 508);
0101 void SetNdivRadial(Int_t Ndiv = 508);
0102 void SetPolarLabel(Int_t div, const TString & label);
0103 void SetPolarLabelSize(Double_t angularsize = 0.04);
0104 void SetPolarLabelColor(Color_t tcolorangular = 1);
0105 void SetPolarLabelFont(Font_t tfontangular = 62);
0106 void SetPolarOffset(Double_t PolarOffset=0.04);
0107 void SetRadialOffset(Double_t RadialOffset=0.025);
0108 void SetRadialLabelSize (Double_t radialsize = 0.035);
0109 void SetRadialLabelColor(Color_t tcolorradial = 1);
0110 void SetRadialLabelFont(Font_t tfontradial = 62);
0111 void SetRangePolar(Double_t tmin, Double_t tmax);
0112 void SetRangeRadial(Double_t rmin, Double_t rmax);
0113 void SetTickpolarSize(Double_t tickpolarsize = 0.02);
0114 void SetToDegree();
0115 void SetToGrad();
0116 void SetToRadian();
0117 void SetTwoPi();
0118
0119 ClassDefOverride(TGraphPolargram,1);
0120 };
0121
0122 #endif