#include <TPieSlice.h>
#include <Riostream.h>
#include <TError.h>
#include <TROOT.h>
#include <TVirtualPad.h>
#include <TArc.h>
#include <TMath.h>
#include <TStyle.h>
#include <TLatex.h>
#include <TPaveText.h>
#include <TH1.h>
ClassImp(TPieSlice)
TPieSlice::TPieSlice() : TNamed(), TAttFill(), TAttLine()
{
   
   fPie = 0;
   fValue = 1;
   fRadiusOffset = 0;
   fIsActive = kFALSE;
}
TPieSlice::TPieSlice(const char *name, const char *title,
                     TPie *pie, Double_t val) :
                     TNamed(name, title), TAttFill(), TAttLine()
{
   
   fPie = pie;
   fValue = val;
   fRadiusOffset = 0;
   fIsActive = kFALSE;
}
Int_t TPieSlice::DistancetoPrimitive(Int_t , Int_t )
{
   
   Int_t dist = 9999;
   if (fIsActive) {
      dist = 0;
      fIsActive = kFALSE;
      gPad->SetCursor(kHand);
   }
   return dist;
}
Double_t TPieSlice::GetRadiusOffset()
{
   
   return fRadiusOffset;
}
Double_t TPieSlice::GetValue()
{
   
   return fValue;
}
void TPieSlice::SavePrimitive(ostream &, Option_t * )
{
   
}
void TPieSlice::SetRadiusOffset(Double_t val)
{
   
   fRadiusOffset = val;
   if (fRadiusOffset<.0) fRadiusOffset = .0;
}
void TPieSlice::SetValue(Double_t val)
{
   
   
   fValue = val;
   if (fValue<.0) {
      Warning("SetValue","Invalid negative value. Absolute value taken");
      fValue *= -1;
   }
   fPie->MakeSlices(kTRUE);
}
Last change: Wed Jun 25 08:50:41 2008
Last generated: 2008-06-25 08:50
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.