ROOT logo
// @(#)root/graf:$Id: TEllipse.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   16/10/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEllipse
#define ROOT_TEllipse


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TEllipse                                                             //
//                                                                      //
// An ellipse.                                                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif


class TEllipse : public TObject, public TAttLine, public TAttFill {

protected:
   Double_t    fX1;        //X coordinate of centre
   Double_t    fY1;        //Y coordinate of centre
   Double_t    fR1;        //first radius
   Double_t    fR2;        //second radius
   Double_t    fPhimin;    //Minimum angle (degrees)
   Double_t    fPhimax;    //Maximum angle (degrees)
   Double_t    fTheta;     //Rotation angle (degrees)

public:
   // TEllipse status bits
   enum {
      kNoEdges     = BIT(9)   // don't draw lines connecting center to edges
   };
   TEllipse();
   TEllipse(Double_t x1, Double_t y1,Double_t r1,Double_t r2=0,Double_t phimin=0, Double_t phimax=360,Double_t theta=0);
   TEllipse(const TEllipse &ellipse);
   virtual ~TEllipse();
   void   Copy(TObject &ellipse) const;
   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
   virtual void   Draw(Option_t *option="");
   virtual void   DrawEllipse(Double_t x1, Double_t y1, Double_t r1,Double_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option="");
   virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
   Double_t       GetX1() const {return fX1;}
   Double_t       GetY1() const {return fY1;}
   Double_t       GetR1() const {return fR1;}
   Double_t       GetR2() const {return fR2;}
   Double_t       GetPhimin() const {return fPhimin;}
   Double_t       GetPhimax() const {return fPhimax;}
   Double_t       GetTheta() const  {return fTheta;}
   Bool_t         GetNoEdges() const;
   virtual void   ls(Option_t *option="") const;
   virtual void   Paint(Option_t *option="");
   virtual void   PaintEllipse(Double_t x1, Double_t y1, Double_t r1,Double_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option="");
   virtual void   Print(Option_t *option="") const;
   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
   virtual void   SetNoEdges(Bool_t noEdges=kTRUE); // *TOGGLE* *GETTER=GetNoEdges
   virtual void   SetPhimin(Double_t phi=0)   {fPhimin=phi;} // *MENU*
   virtual void   SetPhimax(Double_t phi=360) {fPhimax=phi;} // *MENU*
   virtual void   SetR1(Double_t r1) {fR1=r1;} // *MENU*
   virtual void   SetR2(Double_t r2) {fR2=r2;} // *MENU*
   virtual void   SetTheta(Double_t theta=0) {fTheta=theta;} // *MENU*
   virtual void   SetX1(Double_t x1) {fX1=x1;} // *MENU*
   virtual void   SetY1(Double_t y1) {fY1=y1;} // *MENU*

   ClassDef(TEllipse,2)  //An ellipse
};

#endif
 TEllipse.h:1
 TEllipse.h:2
 TEllipse.h:3
 TEllipse.h:4
 TEllipse.h:5
 TEllipse.h:6
 TEllipse.h:7
 TEllipse.h:8
 TEllipse.h:9
 TEllipse.h:10
 TEllipse.h:11
 TEllipse.h:12
 TEllipse.h:13
 TEllipse.h:14
 TEllipse.h:15
 TEllipse.h:16
 TEllipse.h:17
 TEllipse.h:18
 TEllipse.h:19
 TEllipse.h:20
 TEllipse.h:21
 TEllipse.h:22
 TEllipse.h:23
 TEllipse.h:24
 TEllipse.h:25
 TEllipse.h:26
 TEllipse.h:27
 TEllipse.h:28
 TEllipse.h:29
 TEllipse.h:30
 TEllipse.h:31
 TEllipse.h:32
 TEllipse.h:33
 TEllipse.h:34
 TEllipse.h:35
 TEllipse.h:36
 TEllipse.h:37
 TEllipse.h:38
 TEllipse.h:39
 TEllipse.h:40
 TEllipse.h:41
 TEllipse.h:42
 TEllipse.h:43
 TEllipse.h:44
 TEllipse.h:45
 TEllipse.h:46
 TEllipse.h:47
 TEllipse.h:48
 TEllipse.h:49
 TEllipse.h:50
 TEllipse.h:51
 TEllipse.h:52
 TEllipse.h:53
 TEllipse.h:54
 TEllipse.h:55
 TEllipse.h:56
 TEllipse.h:57
 TEllipse.h:58
 TEllipse.h:59
 TEllipse.h:60
 TEllipse.h:61
 TEllipse.h:62
 TEllipse.h:63
 TEllipse.h:64
 TEllipse.h:65
 TEllipse.h:66
 TEllipse.h:67
 TEllipse.h:68
 TEllipse.h:69
 TEllipse.h:70
 TEllipse.h:71
 TEllipse.h:72
 TEllipse.h:73
 TEllipse.h:74
 TEllipse.h:75
 TEllipse.h:76
 TEllipse.h:77
 TEllipse.h:78
 TEllipse.h:79
 TEllipse.h:80
 TEllipse.h:81
 TEllipse.h:82
 TEllipse.h:83
 TEllipse.h:84
 TEllipse.h:85