Logo ROOT  
Reference Guide
Go to the documentation of this file.
2 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
9#ifndef ROOT_TPieSlice
10#define ROOT_TPieSlice
12#include <TNamed.h>
13#include <TAttFill.h>
14#include <TAttLine.h>
16class TPie;
18class TPieSlice : public TNamed, public TAttFill, public TAttLine {
20 friend class TPie;
23 Bool_t fIsActive; ///<! True if is the slice under the mouse pointer
26 TPie *fPie{nullptr}; ///< The TPie object that contain this slice
27 Double_t fValue; ///< value value of this slice
28 Double_t fRadiusOffset; ///< offset from the center of the pie
31 TPieSlice();
32 TPieSlice(const char *, const char *, TPie *, Double_t val = 0);
33 virtual ~TPieSlice() {}
35 void Copy(TObject &slice) const override;
38 Double_t GetValue() const;
39 void SavePrimitive(std::ostream &out, Option_t *opts="") override;
40 void SetIsActive(Bool_t is) { fIsActive = is; }
41 void SetRadiusOffset(Double_t); // *MENU*
42 void SetValue(Double_t); // *MENU*
44 ClassDefOverride(TPieSlice,1) // Slice of a pie chart graphics class
int Int_t
Definition: RtypesCore.h:45
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Fill Area Attributes class.
Definition: TAttFill.h:19
Line Attributes class.
Definition: TAttLine.h:18
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Mother of all ROOT objects.
Definition: TObject.h:41
A slice of a piechart, see the TPie class.
Definition: TPieSlice.h:18
Int_t DistancetoPrimitive(Int_t, Int_t) override
Eval if the mouse is over the area associated with this slice.
Definition: TPieSlice.cxx:55
Double_t fRadiusOffset
offset from the center of the pie
Definition: TPieSlice.h:28
virtual ~TPieSlice()
Definition: TPieSlice.h:33
Double_t fValue
value value of this slice
Definition: TPieSlice.h:27
void SetValue(Double_t)
Set the value for this slice.
Definition: TPieSlice.cxx:114
Bool_t fIsActive
! True if is the slice under the mouse pointer
Definition: TPieSlice.h:23
Double_t GetRadiusOffset() const
return the value of the offset in radial direction for this slice.
Definition: TPieSlice.cxx:71
void SetIsActive(Bool_t is)
Definition: TPieSlice.h:40
void Copy(TObject &slice) const override
Copy TPieSlice.
Definition: TPieSlice.cxx:128
Double_t GetValue() const
Return the value of this slice.
Definition: TPieSlice.cxx:79
void SavePrimitive(std::ostream &out, Option_t *opts="") override
Save as C++ macro, used directly from TPie.
Definition: TPieSlice.cxx:87
void SetRadiusOffset(Double_t)
Set the radial offset of this slice.
Definition: TPieSlice.cxx:104
This is the default constructor, used to create the standard.
Definition: TPieSlice.cxx:31
TPie * fPie
The TPie object that contain this slice.
Definition: TPieSlice.h:26
Draw a Pie Chart,.
Definition: TPie.h:23