library: libGraf #include "TEllipse.h"

# TEllipse

class description - source file - inheritance tree (.pdf)

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

| Inheritance Chart:

`TObject`

`TAttLine`

`TAttFill`

<-

`TEllipse`

<-

`TArc` |

`TCrown` |

        public:

                          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()
           static TClass* Class()
             virtual 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)
                   Bool_t GetNoEdges() const
                 Double_t GetPhimax() const
                 Double_t GetPhimin() const
                 Double_t GetR1() const
                 Double_t GetR2() const
                 Double_t GetTheta() const
                 Double_t GetX1() const
                 Double_t GetY1() const
          virtual TClass* IsA() const
             virtual void ls(Option_t* option = "") const
                TEllipse& operator=(const TEllipse&)
             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(ofstream& out, Option_t* option)
             virtual void SetNoEdges(Bool_t noEdges = kTRUE)
             virtual void SetPhimax(Double_t phi = 360)
             virtual void SetPhimin(Double_t phi = 0)
             virtual void SetR1(Double_t r1)
             virtual void SetR2(Double_t r2)
             virtual void SetTheta(Double_t theta = 0)
             virtual void SetX1(Double_t x1)
             virtual void SetY1(Double_t y1)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        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:

          static const enum TEllipse:: kNoEdges

## Class Description

    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*Ellipse class*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                          =============
      Ellipse is a general ellipse that can be truncated and rotated.
      An Ellipse is defined by its center (x1,y1) and two radius r1 and r2.
      A minimum and maximum angle may be specified (phimin, phimax).
      The Ellipse may be rotated with an angle theta.
      The attributes of the outline line are given via TAttLine.
      The attributes of the fill area are given via TAttFill.
      The picture below illustrates different types of ellipses.

      When an ellipse sector only is drawn, the lines connecting the center
      of the ellipse to the edges are drawn by default. One can specify
      the drawing option "only" to not draw these lines or alternatively
      call the function SetNoEdges().

/* */

TEllipse(): TObject(), TAttLine(), TAttFill()

    *-*-*-*-*-*-*-*-*-*-*Ellipse default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ===========================

TEllipse(Double_t x1, Double_t y1,Double_t r1,Double_t r2,Double_t phimin,Double_t phimax,Double_t theta) :TObject(), TAttLine(), TAttFill(0,1001)

    *-*-*-*-*-*-*-*-*-*-*Ellipse normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ==========================

~TEllipse()

    *-*-*-*-*-*-*-*-*-*-*Ellipse default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ==========================

TEllipse(const TEllipse &ellipse) : TObject(ellipse), TAttLine(ellipse), TAttFill(ellipse)

void Copy(TObject &obj) const

    *-*-*-*-*-*-*-*-*-*-*Copy this ellipse to ellipse*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ============================

Int_t DistancetoPrimitive(Int_t px, Int_t py)

    *-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to an ellipse*-*-*-*
    *-*                  ===========================================
      Compute the closest distance of approach from point px,py to this ellipse.
      The distance is computed in pixels units.

void Draw(Option_t *option)

    *-*-*-*-*-*-*-*-*-*-*Draw this ellipse with its current attributes*-*-*-*-*
    *-*                  ==========================================

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)

    *-*-*-*-*-*-*-*-*-*-*Draw this ellipse with new coordinates*-*-*-*-*-*-*-*-*
    *-*                  ======================================

void ExecuteEvent(Int_t event, Int_t px, Int_t py)

    *-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
    *-*                  =========================================
      This member function is called when a line is clicked with the locator

      If Left button clicked on one of the line end points, this point
         follows the cursor until button is released.

      if Middle button clicked, the line is moved parallel to itself
         until the button is released.

      NOTE that support for log scale is not implemented

void ls(Option_t *) const

    *-*-*-*-*-*-*-*-*-*-*-*List this ellipse with its attributes*-*-*-*-*-*-*-*
    *-*                    =====================================

void Paint(Option_t *option)

    *-*-*-*-*-*-*-*-*-*-*Paint this ellipse with its current attributes*-*-*-*-*
    *-*                  ==============================================

void PaintEllipse(Double_t, Double_t, Double_t, Double_t, Double_t phimin,Double_t phimax, Double_t theta,Option_t *option)

    *-*-*-*-*-*-*-*-*-*-*Draw this ellipse with new coordinates*-*-*-*-*-*-*-*-*
    *-*                  ======================================

void Print(Option_t *) const

    *-*-*-*-*-*-*-*-*-*-*Dump this ellipse with its attributes*-*-*-*-*-*-*-*-*
    *-*                  =====================================

void SavePrimitive(ofstream &out, Option_t *)

     Save primitive as a C++ statement(s) on output stream out

Bool_t GetNoEdges() const

     Return kTRUE if kNoEdges bit is set, kFALSE otherwise.

void SetNoEdges(Bool_t noEdges)

       if  noEdges = kTRUE the lines connecting the center to the edges
       will not be drawn.
       default is to draw the edges.

void Streamer(TBuffer &R__b)

     Stream an object of class TEllipse.

### Inline Functions

               Double_t GetX1() const
               Double_t GetY1() const
               Double_t GetR1() const
               Double_t GetR2() const
               Double_t GetPhimin() const
               Double_t GetPhimax() const
               Double_t GetTheta() const
                   void SetPhimin(Double_t phi = 0)
                   void SetPhimax(Double_t phi = 360)
                   void SetR1(Double_t r1)
                   void SetR2(Double_t r2)
                   void SetTheta(Double_t theta = 0)
                   void SetX1(Double_t x1)
                   void SetY1(Double_t y1)
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void StreamerNVirtual(TBuffer& b)
              TEllipse& operator=(const TEllipse&)

Author: Rene Brun 16/10/95
Last update: root/graf:$Name: $:$Id: TEllipse.cxx,v 1.19 2005/01/13 21:39:40 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *