TEllipse.h

Go to the documentation of this file.
00001 // @(#)root/graf:$Id: TEllipse.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   16/10/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEllipse
00013 #define ROOT_TEllipse
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TEllipse                                                             //
00019 //                                                                      //
00020 // An ellipse.                                                          //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 #ifndef ROOT_TAttLine
00028 #include "TAttLine.h"
00029 #endif
00030 #ifndef ROOT_TAttFill
00031 #include "TAttFill.h"
00032 #endif
00033 
00034 
00035 class TEllipse : public TObject, public TAttLine, public TAttFill {
00036 
00037 protected:
00038    Double_t    fX1;        //X coordinate of centre
00039    Double_t    fY1;        //Y coordinate of centre
00040    Double_t    fR1;        //first radius
00041    Double_t    fR2;        //second radius
00042    Double_t    fPhimin;    //Minimum angle (degrees)
00043    Double_t    fPhimax;    //Maximum angle (degrees)
00044    Double_t    fTheta;     //Rotation angle (degrees)
00045 
00046 public:
00047    // TEllipse status bits
00048    enum {
00049       kNoEdges     = BIT(9)   // don't draw lines connecting center to edges
00050    };
00051    TEllipse();
00052    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);
00053    TEllipse(const TEllipse &ellipse);
00054    virtual ~TEllipse();
00055    void   Copy(TObject &ellipse) const;
00056    virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
00057    virtual void   Draw(Option_t *option="");
00058    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="");
00059    virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
00060    Double_t       GetX1() const {return fX1;}
00061    Double_t       GetY1() const {return fY1;}
00062    Double_t       GetR1() const {return fR1;}
00063    Double_t       GetR2() const {return fR2;}
00064    Double_t       GetPhimin() const {return fPhimin;}
00065    Double_t       GetPhimax() const {return fPhimax;}
00066    Double_t       GetTheta() const  {return fTheta;}
00067    Bool_t         GetNoEdges() const;
00068    virtual void   ls(Option_t *option="") const;
00069    virtual void   Paint(Option_t *option="");
00070    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="");
00071    virtual void   Print(Option_t *option="") const;
00072    virtual void   SavePrimitive(ostream &out, Option_t *option = "");
00073    virtual void   SetNoEdges(Bool_t noEdges=kTRUE); // *TOGGLE* *GETTER=GetNoEdges
00074    virtual void   SetPhimin(Double_t phi=0)   {fPhimin=phi;} // *MENU*
00075    virtual void   SetPhimax(Double_t phi=360) {fPhimax=phi;} // *MENU*
00076    virtual void   SetR1(Double_t r1) {fR1=r1;} // *MENU*
00077    virtual void   SetR2(Double_t r2) {fR2=r2;} // *MENU*
00078    virtual void   SetTheta(Double_t theta=0) {fTheta=theta;} // *MENU*
00079    virtual void   SetX1(Double_t x1) {fX1=x1;} // *MENU*
00080    virtual void   SetY1(Double_t y1) {fY1=y1;} // *MENU*
00081 
00082    ClassDef(TEllipse,2)  //An ellipse
00083 };
00084 
00085 #endif

Generated on Tue Jul 5 14:14:08 2011 for ROOT_528-00b_version by  doxygen 1.5.1