23 class TPie :
public TNamed ,
public TAttText {
25 void Init(Int_t np, Double_t ao, Double_t x, Double_t y, Double_t r);
36 Double_t fAngularOffset;
37 Float_t fLabelsOffset;
40 TString fFractionFormat;
41 TString fPercentFormat;
43 TPieSlice **fPieSlices;
50 TPie(
const char *,
const char *, Int_t);
51 TPie(
const char *,
const char *, Int_t, Double_t *,Int_t *cols=0,
const char *lbls[]=0);
52 TPie(
const char *,
const char *, Int_t, Float_t *,Int_t *cols=0,
const char *lbls[]=0);
57 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
58 Int_t DistancetoSlice(Int_t,Int_t);
59 virtual void Draw(Option_t *option=
"l");
60 virtual void ExecuteEvent(Int_t,Int_t,Int_t);
61 Float_t GetAngle3D() {
return fAngle3D; }
62 Double_t GetAngularOffset() {
return fAngularOffset; }
63 Int_t GetEntryFillColor(Int_t);
64 Int_t GetEntryFillStyle(Int_t);
65 const char* GetEntryLabel(Int_t);
66 Int_t GetEntryLineColor(Int_t);
67 Int_t GetEntryLineStyle(Int_t);
68 Int_t GetEntryLineWidth(Int_t);
69 Double_t GetEntryRadiusOffset(Int_t);
70 Double_t GetEntryVal(Int_t);
71 const char *GetFractionFormat() {
return fFractionFormat.Data(); }
72 Double_t GetHeight() {
return fHeight; }
73 const char *GetLabelFormat() {
return fLabelFormat.Data(); }
74 Float_t GetLabelsOffset() {
return fLabelsOffset; }
76 Int_t GetEntries() {
return fNvals; }
77 const char *GetPercentFormat() {
return fPercentFormat.Data(); }
78 Double_t GetRadius() {
return fRadius;}
79 TPieSlice *GetSlice(Int_t i);
80 const char *GetValueFormat() {
return fValueFormat.Data(); }
81 Double_t GetX() {
return fX; }
82 Double_t GetY() {
return fY; }
83 TLegend *MakeLegend(Double_t x1=.65,Double_t y1=.65,Double_t x2=.95, Double_t y2=.95,
const char *leg_header=
"");
84 void MakeSlices(Bool_t force=kFALSE);
85 virtual void Paint(Option_t *);
86 void SavePrimitive(std::ostream &out, Option_t *opts=
"");
87 void SetAngle3D(Float_t val = 30.);
88 void SetAngularOffset(Double_t);
89 void SetCircle(Double_t x=.5, Double_t y=.5, Double_t rad=.4);
90 void SetEntryLabel(Int_t,
const char *text=
"Slice");
91 void SetEntryLineColor(Int_t, Int_t);
92 void SetEntryLineStyle(Int_t, Int_t);
93 void SetEntryLineWidth(Int_t, Int_t);
94 void SetEntryFillColor(Int_t, Int_t);
95 void SetEntryFillStyle(Int_t, Int_t);
96 void SetEntryRadiusOffset(Int_t, Double_t);
97 void SetEntryVal(Int_t, Double_t);
98 void SetFillColors(Int_t*);
99 void SetFractionFormat(
const char*);
100 void SetHeight(Double_t val=.08);
101 void SetLabelFormat(
const char *);
102 void SetLabels(
const char *[]);
103 void SetLabelsOffset(Float_t);
104 void SetPercentFormat(
const char *);
105 void SetRadius(Double_t);
106 void SetValueFormat(
const char *);
109 void SortSlices(Bool_t amode=kTRUE,Float_t merge_thresold=.0);