// @(#)root/graf:$Id$
// 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.             *
 *************************************************************************/

#include <stdlib.h>

#include "Riostream.h"
#include "TROOT.h"
#include "TEllipse.h"
#include "TVirtualPad.h"
#include "TMath.h"
#include "TClass.h"
#include "TPoint.h"

const Double_t kPI = 3.14159265358979323846;

ClassImp(TEllipse)


//______________________________________________________________________________
/* Begin_Html
<center><h2>TEllipse : to draw ellipses</h2></center>
The ellipse can be truncated and rotated.
It is defined by its center <tt>(x1,y1)</tt> and two radius
<tt>r1</tt> and <tt>r2</tt>.
A minimum and maximum angle may be specified <tt>(phimin, phimax)</tt>.
The ellipse may be rotated with an angle <tt>theta</tt>. All these
angles are in degrees.
The attributes of the outline line are given via <tt>TAttLine</tt>.
The attributes of the fill area are given via <tt>TAttFill</tt>.
The picture below illustrates different types of ellipses.
<p>
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 <tt>SetNoEdges()</tt>. To remove completely the ellipse
outline it is enough to specify 0 as line style.
End_Html
Begin_Macro(source)
../../../tutorials/graphics/ellipse.C
End_Macro */


//______________________________________________________________________________
TEllipse::TEllipse(): TObject(), TAttLine(), TAttFill()
{
   // Ellipse default constructor.

   fX1 = 0;
   fY1 = 0;
   fR1 = 1;
   fR2 = 1;
   fPhimin = 0;
   fPhimax = 360;
   fTheta  = 0;
}


//______________________________________________________________________________
TEllipse::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.

   fX1     = x1;
   fY1     = y1;
   fR1     = r1;
   fR2     = r2;
   fPhimin = phimin;
   fPhimax = phimax;
   fTheta  = theta;
   if (r2 <= 0) fR2 = fR1;
}


//______________________________________________________________________________
TEllipse::~TEllipse()
{
   // Ellipse default destructor.

}


//______________________________________________________________________________
TEllipse::TEllipse(const TEllipse &ellipse) : TObject(ellipse), TAttLine(ellipse), TAttFill(ellipse), TAttBBox2D(ellipse)
{
   // Copy constructor.

   fX1 = 0;
   fY1 = 0;
   fR1 = 1;
   fR2 = 1;
   fPhimin = 0;
   fPhimax = 360;
   fTheta  = 0;

   ((TEllipse&)ellipse).Copy(*this);
}


//______________________________________________________________________________
void TEllipse::Copy(TObject &obj) const
{
   // Copy this ellipse to ellipse.

   TObject::Copy(obj);
   TAttLine::Copy(((TEllipse&)obj));
   TAttFill::Copy(((TEllipse&)obj));
   ((TEllipse&)obj).fX1 = fX1;
   ((TEllipse&)obj).fY1 = fY1;
   ((TEllipse&)obj).fR1 = fR1;
   ((TEllipse&)obj).fR2 = fR2;
   ((TEllipse&)obj).fPhimin = fPhimin;
   ((TEllipse&)obj).fPhimax = fPhimax;
   ((TEllipse&)obj).fTheta  = fTheta;
}


//______________________________________________________________________________
Int_t TEllipse::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.
   //
   // In case of a filled ellipse the distance returned is 0 if the point
   // (px,py) is inside the ellipse, and is huge if the point is outside.

   Double_t x = gPad->PadtoX(gPad->AbsPixeltoX(px));
   Double_t y = gPad->PadtoY(gPad->AbsPixeltoY(py));

   Double_t dxnr = x - fX1;
   Double_t dynr = y - fY1;

   Double_t ct = TMath::Cos(kPI*GetTheta()/180.0);
   Double_t st = TMath::Sin(kPI*GetTheta()/180.0);

   Double_t dx =  dxnr*ct + dynr*st;
   Double_t dy = -dxnr*st + dynr*ct;

   Double_t r1 = fR1;
   Double_t r2 = fR2;

   if (dx == 0 || r1 == 0 || r2 == 0) return 9999;
   Double_t distp = TMath::Sqrt(dx*dx + dy*dy);

   Double_t tana = dy/dx;
   tana *= tana;
   Double_t distr = TMath::Sqrt((1+tana)/(1.0/(r1*r1) + tana/(r2*r2)));
   Int_t dist = 9999;
   if (GetFillColor() && GetFillStyle()) {
      if (distr > distp) dist = 0;
   } else {
      if (TMath::Abs(distr-distp)/(r1+r2) < 0.01) dist = 0;
   }
   return dist;
}


//______________________________________________________________________________
void TEllipse::Draw(Option_t *option)
{
   // Draw this ellipse with its current attributes.

   AppendPad(option);

}


//______________________________________________________________________________
void TEllipse::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.

   TEllipse *newellipse = new TEllipse(x1, y1, r1, r2, phimin, phimax,theta);
   TAttLine::Copy(*newellipse);
   TAttFill::Copy(*newellipse);
   newellipse->SetBit(kCanDelete);
   newellipse->AppendPad(option);
   if (TestBit(kNoEdges)) newellipse->SetBit(kNoEdges);
}


//______________________________________________________________________________
void TEllipse::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

   Int_t kMaxDiff = 10;

   Int_t i, dpx, dpy;
   Double_t angle,dx,dy,dphi,ct,st,fTy,fBy,fLx,fRx;
   static Int_t px1,py1,npe,r1,r2,sav1,sav2;
   const Int_t kMinSize = 25;
   const Int_t np = 40;
   static Bool_t pTop, pL, pR, pBot, pINSIDE;
   static Int_t pTx,pTy,pLx,pLy,pRx,pRy,pBx,pBy;
   static Int_t x[np+2], y[np+2];
   static Int_t pxold, pyold;
   static Int_t sig,impair;
   static Double_t sdx, sdy;
   static Double_t oldX1, oldY1, oldR1, oldR2;

   Bool_t opaque  = gPad->OpaqueMoving();

   if (!gPad->IsEditable()) return;

   switch (event) {

   case kArrowKeyPress:
   case kButton1Down:
         oldX1 = fX1;
         oldY1 = fY1;
         oldR1 = fR1;
         oldR2 = fR2;
         dphi = (fPhimax-fPhimin)*kPI/(180*np);
         ct   = TMath::Cos(kPI*fTheta/180);
         st   = TMath::Sin(kPI*fTheta/180);
         for (i=0;i<np;i++) {
            angle = fPhimin*kPI/180 + Double_t(i)*dphi;
            dx    = fR1*TMath::Cos(angle);
            dy    = fR2*TMath::Sin(angle);
            x[i]  = gPad->XtoAbsPixel(fX1 + dx*ct - dy*st);
            y[i]  = gPad->YtoAbsPixel(fY1 + dx*st + dy*ct);
         }
         if (fPhimax-fPhimin >= 360 ) {
            x[np] = x[0];
            y[np] = y[0];
            npe = np;
         } else {
            x[np]   = gPad->XtoAbsPixel(fX1);
            y[np]   = gPad->YtoAbsPixel(fY1);
            x[np+1] = x[0];
            y[np+1] = y[0];
            npe = np + 1;
         }
         impair = 0;
         px1 = gPad->XtoAbsPixel(fX1);
         py1 = gPad->YtoAbsPixel(fY1);
         pTx = pBx = px1;
         pLy = pRy = py1;
         pTy = gPad->YtoAbsPixel(fR2+fY1);
         pBy = gPad->YtoAbsPixel(-fR2+fY1);
         pLx = gPad->XtoAbsPixel(-fR1+fX1);
         pRx = gPad->XtoAbsPixel(fR1+fX1);
         r2 = (pBy-pTy)/2;
         r1 = (pRx-pLx)/2;
      if (!opaque) {
         gVirtualX->SetLineColor(-1);
         TAttLine::Modify();
         gVirtualX->DrawLine(pRx+4, py1+4, pRx-4, py1+4);
         gVirtualX->DrawLine(pRx-4, py1+4, pRx-4, py1-4);
         gVirtualX->DrawLine(pRx-4, py1-4, pRx+4, py1-4);
         gVirtualX->DrawLine(pRx+4, py1-4, pRx+4, py1+4);
         gVirtualX->DrawLine(pLx+4, py1+4, pLx-4, py1+4);
         gVirtualX->DrawLine(pLx-4, py1+4, pLx-4, py1-4);
         gVirtualX->DrawLine(pLx-4, py1-4, pLx+4, py1-4);
         gVirtualX->DrawLine(pLx+4, py1-4, pLx+4, py1+4);
         gVirtualX->DrawLine(px1+4, pBy+4, px1-4, pBy+4);
         gVirtualX->DrawLine(px1-4, pBy+4, px1-4, pBy-4);
         gVirtualX->DrawLine(px1-4, pBy-4, px1+4, pBy-4);
         gVirtualX->DrawLine(px1+4, pBy-4, px1+4, pBy+4);
         gVirtualX->DrawLine(px1+4, pTy+4, px1-4, pTy+4);
         gVirtualX->DrawLine(px1-4, pTy+4, px1-4, pTy-4);
         gVirtualX->DrawLine(px1-4, pTy-4, px1+4, pTy-4);
         gVirtualX->DrawLine(px1+4, pTy-4, px1+4, pTy+4);
      }
      else {
         sdx = this->GetX1()-gPad->AbsPixeltoX(px);
         sdy = this->GetY1()-gPad->AbsPixeltoY(py);
      }
      // No break !!!

   case kMouseMotion:
      px1 = gPad->XtoAbsPixel(fX1);
      py1 = gPad->YtoAbsPixel(fY1);
      pTx = pBx = px1;
      pLy = pRy = py1;
      pTy = gPad->YtoAbsPixel(fR2+fY1);
      pBy = gPad->YtoAbsPixel(-fR2+fY1);
      pLx = gPad->XtoAbsPixel(-fR1+fX1);
      pRx = gPad->XtoAbsPixel(fR1+fX1);
      pTop = pL = pR = pBot = pINSIDE = kFALSE;
      if ((TMath::Abs(px - pTx) < kMaxDiff) &&
          (TMath::Abs(py - pTy) < kMaxDiff)) {             // top edge
         pTop = kTRUE;
         gPad->SetCursor(kTopSide);
      }
      else
      if ((TMath::Abs(px - pBx) < kMaxDiff) &&
          (TMath::Abs(py - pBy) < kMaxDiff)) {             // bottom edge
         pBot = kTRUE;
         gPad->SetCursor(kBottomSide);
      }
      else
      if ((TMath::Abs(py - pLy) < kMaxDiff) &&
          (TMath::Abs(px - pLx) < kMaxDiff)) {             // left edge
         pL = kTRUE;
         gPad->SetCursor(kLeftSide);
      }
      else
      if ((TMath::Abs(py - pRy) < kMaxDiff) &&
          (TMath::Abs(px - pRx) < kMaxDiff)) {             // right edge
         pR = kTRUE;
         gPad->SetCursor(kRightSide);
      }
      else {pINSIDE= kTRUE; gPad->SetCursor(kMove); }
      pxold = px;  pyold = py;

      break;

   case kArrowKeyRelease:
   case kButton1Motion:
      if (!opaque)
      {
         gVirtualX->DrawLine(pRx+4, py1+4, pRx-4, py1+4);
         gVirtualX->DrawLine(pRx-4, py1+4, pRx-4, py1-4);
         gVirtualX->DrawLine(pRx-4, py1-4, pRx+4, py1-4);
         gVirtualX->DrawLine(pRx+4, py1-4, pRx+4, py1+4);
         gVirtualX->DrawLine(pLx+4, py1+4, pLx-4, py1+4);
         gVirtualX->DrawLine(pLx-4, py1+4, pLx-4, py1-4);
         gVirtualX->DrawLine(pLx-4, py1-4, pLx+4, py1-4);
         gVirtualX->DrawLine(pLx+4, py1-4, pLx+4, py1+4);
         gVirtualX->DrawLine(px1+4, pBy+4, px1-4, pBy+4);
         gVirtualX->DrawLine(px1-4, pBy+4, px1-4, pBy-4);
         gVirtualX->DrawLine(px1-4, pBy-4, px1+4, pBy-4);
         gVirtualX->DrawLine(px1+4, pBy-4, px1+4, pBy+4);
         gVirtualX->DrawLine(px1+4, pTy+4, px1-4, pTy+4);
         gVirtualX->DrawLine(px1-4, pTy+4, px1-4, pTy-4);
         gVirtualX->DrawLine(px1-4, pTy-4, px1+4, pTy-4);
         gVirtualX->DrawLine(px1+4, pTy-4, px1+4, pTy+4);
         for (i=0;i<npe;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
      }
      if (pTop) {
         sav1 = py1;
         sav2 = r2;
         py1 += (py - pyold)/2;
         r2 -= (py - pyold)/2;
         if (TMath::Abs(pyold-py)%2==1) impair++;
         if (py-pyold>0) sig=+1;
         else sig=-1;
         if (impair==2) { impair = 0; py1 += sig; r2 -= sig;}
         if (py1 > pBy-kMinSize) {py1 = sav1; r2 = sav2; py = pyold;}
      }
      if (pBot) {
         sav1 = py1;
         sav2 = r2;
         py1 += (py - pyold)/2;
         r2 += (py - pyold)/2;
         if (TMath::Abs(pyold-py)%2==1) impair++;
         if (py-pyold>0) sig=+1;
         else sig=-1;
         if (impair==2) { impair = 0; py1 += sig; r2 += sig;}
         if (py1 < pTy+kMinSize) {py1 = sav1; r2 = sav2; py = pyold;}
      }
      if (pL) {
         sav1 = px1;
         sav2 = r1;
         px1 += (px - pxold)/2;
         r1 -= (px - pxold)/2;
         if (TMath::Abs(pxold-px)%2==1) impair++;
         if (px-pxold>0) sig=+1;
         else sig=-1;
         if (impair==2) { impair = 0; px1 += sig; r1 -= sig;}
         if (px1 > pRx-kMinSize) {px1 = sav1; r1 = sav2; px = pxold;}
      }
      if (pR) {
         sav1 = px1;
         sav2 = r1;
         px1 += (px - pxold)/2;
         r1 += (px - pxold)/2;
         if (TMath::Abs(pxold-px)%2==1) impair++;
         if (px-pxold>0) sig=+1;
         else sig=-1;
         if (impair==2) { impair = 0; px1 += sig; r1 += sig;}
         if (px1 < pLx+kMinSize) {px1 = sav1; r1 = sav2; px = pxold;}
      }
      if (pTop || pBot || pL || pR) {
         if (!opaque) {
            dphi = (fPhimax-fPhimin)*kPI/(180*np);
            ct   = TMath::Cos(kPI*fTheta/180);
            st   = TMath::Sin(kPI*fTheta/180);
            for (i=0;i<np;i++) {
               angle = fPhimin*kPI/180 + Double_t(i)*dphi;
               dx    = r1*TMath::Cos(angle);
               dy    = r2*TMath::Sin(angle);
               x[i]  = px1 + Int_t(dx*ct - dy*st);
               y[i]  = py1 + Int_t(dx*st + dy*ct);
            }
            if (fPhimax-fPhimin >= 360 ) {
               x[np] = x[0];
               y[np] = y[0];
               npe = np;
            } else {
               x[np]   = px1;
               y[np]   = py1;
               x[np+1] = x[0];
               y[np+1] = y[0];
               npe = np + 1;
            }
            gVirtualX->SetLineColor(-1);
            TAttLine::Modify();
            for (i=0;i<npe;i++)
               gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         }
         else
         {
            this->SetX1(gPad->AbsPixeltoX(px1));
            this->SetY1(gPad->AbsPixeltoY(py1));
            this->SetR1(TMath::Abs(gPad->AbsPixeltoX(px1-r1)-gPad->AbsPixeltoX(px1+r1))/2);
            this->SetR2(TMath::Abs(gPad->AbsPixeltoY(py1-r2)-gPad->AbsPixeltoY(py1+r2))/2);
            if (pTop) gPad->ShowGuidelines(this, event, 't', true);
            if (pBot) gPad->ShowGuidelines(this, event, 'b', true);
            if (pL) gPad->ShowGuidelines(this, event, 'l', true);
            if (pR) gPad->ShowGuidelines(this, event, 'r', true);
            gPad->Modified(kTRUE);
            gPad->Update();
         }
      }
      if (pINSIDE) {
         if (!opaque){
            dpx  = px-pxold;  dpy = py-pyold;
            px1 += dpx; py1 += dpy;
            for (i=0;i<=npe;i++) { x[i] += dpx; y[i] += dpy;}
            for (i=0;i<npe;i++) gVirtualX->DrawLine(x[i], y[i], x[i+1], y[i+1]);
         }
         else {
            this->SetX1(gPad->AbsPixeltoX(px)+sdx);
            this->SetY1(gPad->AbsPixeltoY(py)+sdy);
            gPad->ShowGuidelines(this, event, 'i', true);
            gPad->Modified(kTRUE);
            gPad->Update();
         }
      }
      if (!opaque){
         pTx = pBx = px1;
         pRx = px1+r1;
         pLx = px1-r1;
         pRy = pLy = py1;
         pTy = py1-r2;
         pBy = py1+r2;
         gVirtualX->DrawLine(pRx+4, py1+4, pRx-4, py1+4);
         gVirtualX->DrawLine(pRx-4, py1+4, pRx-4, py1-4);
         gVirtualX->DrawLine(pRx-4, py1-4, pRx+4, py1-4);
         gVirtualX->DrawLine(pRx+4, py1-4, pRx+4, py1+4);
         gVirtualX->DrawLine(pLx+4, py1+4, pLx-4, py1+4);
         gVirtualX->DrawLine(pLx-4, py1+4, pLx-4, py1-4);
         gVirtualX->DrawLine(pLx-4, py1-4, pLx+4, py1-4);
         gVirtualX->DrawLine(pLx+4, py1-4, pLx+4, py1+4);
         gVirtualX->DrawLine(px1+4, pBy+4, px1-4, pBy+4);
         gVirtualX->DrawLine(px1-4, pBy+4, px1-4, pBy-4);
         gVirtualX->DrawLine(px1-4, pBy-4, px1+4, pBy-4);
         gVirtualX->DrawLine(px1+4, pBy-4, px1+4, pBy+4);
         gVirtualX->DrawLine(px1+4, pTy+4, px1-4, pTy+4);
         gVirtualX->DrawLine(px1-4, pTy+4, px1-4, pTy-4);
         gVirtualX->DrawLine(px1-4, pTy-4, px1+4, pTy-4);
         gVirtualX->DrawLine(px1+4, pTy-4, px1+4, pTy+4);
      }
      pxold = px;
      pyold = py;
      break;

   case kButton1Up:
      if (gROOT->IsEscaped()) {
        gROOT->SetEscape(kFALSE);
        if (opaque) {
            this->SetX1(oldX1);
            this->SetY1(oldY1);
            this->SetR1(oldR1);
            this->SetR2(oldR2);
            gPad->Modified(kTRUE);
            gPad->Update();
         }
         break;
      }

      if (opaque) {
         gPad->ShowGuidelines(this, event);
      } else {
         fX1 = gPad->AbsPixeltoX(px1);
         fY1 = gPad->AbsPixeltoY(py1);
         fBy = gPad->AbsPixeltoY(py1+r2);
         fTy = gPad->AbsPixeltoY(py1-r2);
         fLx = gPad->AbsPixeltoX(px1+r1);
         fRx = gPad->AbsPixeltoX(px1-r1);
         fR1 = TMath::Abs(fRx-fLx)/2;
         fR2 = TMath::Abs(fTy-fBy)/2;
         gPad->Modified(kTRUE);
         gVirtualX->SetLineColor(-1);
      }
   }
}


//______________________________________________________________________________
void TEllipse::ls(Option_t *) const
{
   // List this ellipse with its attributes.

   TROOT::IndentLevel();
   printf("%s:  X1= %f Y1=%f R1=%f R2=%f\n",GetName(),fX1,fY1,fR1,fR2);
}


//______________________________________________________________________________
void TEllipse::Paint(Option_t *option)
{
   // Paint this ellipse with its current attributes.

   PaintEllipse(fX1,fY1,fR1,fR2,fPhimin,fPhimax,fTheta,option);
}


//______________________________________________________________________________
void TEllipse::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)
{
   // Draw this ellipse with new coordinates.

   const Int_t np = 200;
   static Double_t x[np+3], y[np+3];
   TAttLine::Modify();  //Change line attributes only if necessary
   TAttFill::Modify();  //Change fill attributes only if necessary

   Double_t phi1 = TMath::Min(phimin,phimax);
   Double_t phi2 = TMath::Max(phimin,phimax);

   //set number of points approximatively proportional to the ellipse circumference
   Double_t circ = kPI*(r1+r2)*(phi2-phi1)/360;
   Int_t n = (Int_t)(np*circ/((gPad->GetX2()-gPad->GetX1())+(gPad->GetY2()-gPad->GetY1())));
   if (n < 8) n= 8;
   if (n > np) n = np;
   Double_t angle,dx,dy;
   Double_t dphi = (phi2-phi1)*kPI/(180*n);
   Double_t ct   = TMath::Cos(kPI*theta/180);
   Double_t st   = TMath::Sin(kPI*theta/180);
   for (Int_t i=0;i<=n;i++) {
      angle = phi1*kPI/180 + Double_t(i)*dphi;
      dx    = r1*TMath::Cos(angle);
      dy    = r2*TMath::Sin(angle);
      x[i]  = gPad->XtoPad(x1 + dx*ct - dy*st);
      y[i]  = gPad->YtoPad(y1 + dx*st + dy*ct);
   }
   TString opt = option;
   opt.ToLower();
   if (phi2-phi1 >= 360 ) {
      if (GetFillStyle()) gPad->PaintFillArea(n,x,y);
      if (GetLineStyle()) gPad->PaintPolyLine(n+1,x,y);
   } else {
      x[n+1] = gPad->XtoPad(x1);
      y[n+1] = gPad->YtoPad(y1);
      x[n+2] = x[0];
      y[n+2] = y[0];
      if (GetFillStyle()) gPad->PaintFillArea(n+2,x,y);
      if (GetLineStyle()) {
         if (TestBit(kNoEdges) || opt.Contains("only")) gPad->PaintPolyLine(n+1,x,y);
         else                                           gPad->PaintPolyLine(n+3,x,y);
      }
   }
}


//______________________________________________________________________________
void TEllipse::Print(Option_t *) const
{
   // Dump this ellipse with its attributes.

   printf("Ellipse:  X1=%f Y1=%f R1=%f R2=%f",fX1,fY1,fR1,fR2);
   if (GetLineColor() != 1) printf(" Color=%d",GetLineColor());
   if (GetLineStyle() != 1) printf(" Style=%d",GetLineStyle());
   if (GetLineWidth() != 1) printf(" Width=%d",GetLineWidth());
   printf("\n");
}


//______________________________________________________________________________
void TEllipse::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
{
   // Save primitive as a C++ statement(s) on output stream out

   out<<"   "<<std::endl;
   if (gROOT->ClassSaved(TEllipse::Class())) {
      out<<"   ";
   } else {
      out<<"   TEllipse *";
   }
   out<<"ellipse = new TEllipse("<<fX1<<","<<fY1<<","<<fR1<<","<<fR2
      <<","<<fPhimin<<","<<fPhimax<<","<<fTheta<<");"<<std::endl;

   SaveFillAttributes(out,"ellipse",0,1001);
   SaveLineAttributes(out,"ellipse",1,1,1);

   if (GetNoEdges()) out<<"   ellipse->SetNoEdges();"<<std::endl;

   out<<"   ellipse->Draw();"<<std::endl;
}


//______________________________________________________________________________
Bool_t TEllipse::GetNoEdges() const
{
   // Return kTRUE if kNoEdges bit is set, kFALSE otherwise.

   return TestBit(kNoEdges) ? kTRUE : kFALSE;
}


//______________________________________________________________________________
void TEllipse::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.

   if (noEdges) SetBit(kNoEdges);
   else         ResetBit(kNoEdges);
}


//______________________________________________________________________________
void TEllipse::Streamer(TBuffer &R__b)
{
   // Stream an object of class TEllipse.

   if (R__b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
      if (R__v > 1) {
         R__b.ReadClassBuffer(TEllipse::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TObject::Streamer(R__b);
      TAttLine::Streamer(R__b);
      TAttFill::Streamer(R__b);
      Float_t x1,y1,r1,r2,phimin,phimax,theta;
      R__b >> x1;     fX1 = x1;
      R__b >> y1;     fY1 = y1;
      R__b >> r1;     fR1 = r1;
      R__b >> r2;     fR2 = r2;
      R__b >> phimin; fPhimin = phimin;
      R__b >> phimax; fPhimax = phimax;
      R__b >> theta;  fTheta  = theta;
      R__b.CheckByteCount(R__s, R__c, TEllipse::IsA());
      //====end of old versions

   } else {
      R__b.WriteClassBuffer(TEllipse::Class(),this);
   }
}

//______________________________________________________________________________
Rectangle_t TEllipse::GetBBox()
{
   // Return the bounding Box of the Ellipse, currently not taking into
   // account the rotating angle.

   Rectangle_t BBox;
   BBox.fX = gPad->XtoPixel(fX1-fR1);
   BBox.fY = gPad->YtoPixel(fY1+fR2);
   BBox.fWidth = gPad->XtoPixel(fX1+fR1)-gPad->XtoPixel(fX1-fR1);
   BBox.fHeight = gPad->YtoPixel(fY1-fR2)-gPad->YtoPixel(fY1+fR2);
   return (BBox);
}

//______________________________________________________________________________
TPoint TEllipse::GetBBoxCenter()
{
   // Return the center of the Ellipse as TPoint in pixels

   TPoint p;
   p.SetX(gPad->XtoPixel(fX1));
   p.SetY(gPad->YtoPixel(fY1));
   return(p);
}

//______________________________________________________________________________
void TEllipse::SetBBoxCenter(const TPoint &p)
{
   // Set center of the Ellipse

   fX1 = gPad->PixeltoX(p.GetX());
   fY1 = gPad->PixeltoY(p.GetY()-gPad->VtoPixel(0));
}

//______________________________________________________________________________
void TEllipse::SetBBoxCenterX(const Int_t x)
{
   // Set X coordinate of the center of the Ellipse

   fX1 = gPad->PixeltoX(x);
}

//______________________________________________________________________________
void TEllipse::SetBBoxCenterY(const Int_t y)
{
   // Set Y coordinate of the center of the Ellipse

   fY1 = gPad->PixeltoY(y-gPad->VtoPixel(0));
}

//_______________________________________________________________________________
void TEllipse::SetBBoxX1(const Int_t x)
{
   // Set lefthandside of BoundingBox to a value
   // (resize in x direction on left)

   Double_t x1 = gPad->PixeltoX(x);
   if (x1>fX1+fR1) return;

   fR1 = (fX1+fR1-x1)*0.5;
   fX1 = x1 + fR1;
}

//_______________________________________________________________________________
void TEllipse::SetBBoxX2(const Int_t x)
{
   // Set righthandside of BoundingBox to a value
   // (resize in x direction on right)

   Double_t x2 = gPad->PixeltoX(x);
   if (x2<fX1-fR1) return;

   fR1 = (x2-fX1+fR1)*0.5;
   fX1 = x2-fR1;
}

//_______________________________________________________________________________
void TEllipse::SetBBoxY1(const Int_t y)
{
   // Set top of BoundingBox to a value (resize in y direction on top)

   Double_t y1 = gPad->PixeltoY(y-gPad->VtoPixel(0));
   if (y1<fY1-fR2) return;

   fR2 = (y1-fY1+fR2)*0.5;
   fY1 = y1-fR2;
}

//_______________________________________________________________________________
void TEllipse::SetBBoxY2(const Int_t y)
{
   // Set bottom of BoundingBox to a value
   // (resize in y direction on bottom)

   Double_t y2 = gPad->PixeltoY(y-gPad->VtoPixel(0));

   if (y2>fY1+fR2) return;

   fR2 = (fY1+fR2-y2)*0.5;
   fY1 = y2+fR2;
}
 TEllipse.cxx:1
 TEllipse.cxx:2
 TEllipse.cxx:3
 TEllipse.cxx:4
 TEllipse.cxx:5
 TEllipse.cxx:6
 TEllipse.cxx:7
 TEllipse.cxx:8
 TEllipse.cxx:9
 TEllipse.cxx:10
 TEllipse.cxx:11
 TEllipse.cxx:12
 TEllipse.cxx:13
 TEllipse.cxx:14
 TEllipse.cxx:15
 TEllipse.cxx:16
 TEllipse.cxx:17
 TEllipse.cxx:18
 TEllipse.cxx:19
 TEllipse.cxx:20
 TEllipse.cxx:21
 TEllipse.cxx:22
 TEllipse.cxx:23
 TEllipse.cxx:24
 TEllipse.cxx:25
 TEllipse.cxx:26
 TEllipse.cxx:27
 TEllipse.cxx:28
 TEllipse.cxx:29
 TEllipse.cxx:30
 TEllipse.cxx:31
 TEllipse.cxx:32
 TEllipse.cxx:33
 TEllipse.cxx:34
 TEllipse.cxx:35
 TEllipse.cxx:36
 TEllipse.cxx:37
 TEllipse.cxx:38
 TEllipse.cxx:39
 TEllipse.cxx:40
 TEllipse.cxx:41
 TEllipse.cxx:42
 TEllipse.cxx:43
 TEllipse.cxx:44
 TEllipse.cxx:45
 TEllipse.cxx:46
 TEllipse.cxx:47
 TEllipse.cxx:48
 TEllipse.cxx:49
 TEllipse.cxx:50
 TEllipse.cxx:51
 TEllipse.cxx:52
 TEllipse.cxx:53
 TEllipse.cxx:54
 TEllipse.cxx:55
 TEllipse.cxx:56
 TEllipse.cxx:57
 TEllipse.cxx:58
 TEllipse.cxx:59
 TEllipse.cxx:60
 TEllipse.cxx:61
 TEllipse.cxx:62
 TEllipse.cxx:63
 TEllipse.cxx:64
 TEllipse.cxx:65
 TEllipse.cxx:66
 TEllipse.cxx:67
 TEllipse.cxx:68
 TEllipse.cxx:69
 TEllipse.cxx:70
 TEllipse.cxx:71
 TEllipse.cxx:72
 TEllipse.cxx:73
 TEllipse.cxx:74
 TEllipse.cxx:75
 TEllipse.cxx:76
 TEllipse.cxx:77
 TEllipse.cxx:78
 TEllipse.cxx:79
 TEllipse.cxx:80
 TEllipse.cxx:81
 TEllipse.cxx:82
 TEllipse.cxx:83
 TEllipse.cxx:84
 TEllipse.cxx:85
 TEllipse.cxx:86
 TEllipse.cxx:87
 TEllipse.cxx:88
 TEllipse.cxx:89
 TEllipse.cxx:90
 TEllipse.cxx:91
 TEllipse.cxx:92
 TEllipse.cxx:93
 TEllipse.cxx:94
 TEllipse.cxx:95
 TEllipse.cxx:96
 TEllipse.cxx:97
 TEllipse.cxx:98
 TEllipse.cxx:99
 TEllipse.cxx:100
 TEllipse.cxx:101
 TEllipse.cxx:102
 TEllipse.cxx:103
 TEllipse.cxx:104
 TEllipse.cxx:105
 TEllipse.cxx:106
 TEllipse.cxx:107
 TEllipse.cxx:108
 TEllipse.cxx:109
 TEllipse.cxx:110
 TEllipse.cxx:111
 TEllipse.cxx:112
 TEllipse.cxx:113
 TEllipse.cxx:114
 TEllipse.cxx:115
 TEllipse.cxx:116
 TEllipse.cxx:117
 TEllipse.cxx:118
 TEllipse.cxx:119
 TEllipse.cxx:120
 TEllipse.cxx:121
 TEllipse.cxx:122
 TEllipse.cxx:123
 TEllipse.cxx:124
 TEllipse.cxx:125
 TEllipse.cxx:126
 TEllipse.cxx:127
 TEllipse.cxx:128
 TEllipse.cxx:129
 TEllipse.cxx:130
 TEllipse.cxx:131
 TEllipse.cxx:132
 TEllipse.cxx:133
 TEllipse.cxx:134
 TEllipse.cxx:135
 TEllipse.cxx:136
 TEllipse.cxx:137
 TEllipse.cxx:138
 TEllipse.cxx:139
 TEllipse.cxx:140
 TEllipse.cxx:141
 TEllipse.cxx:142
 TEllipse.cxx:143
 TEllipse.cxx:144
 TEllipse.cxx:145
 TEllipse.cxx:146
 TEllipse.cxx:147
 TEllipse.cxx:148
 TEllipse.cxx:149
 TEllipse.cxx:150
 TEllipse.cxx:151
 TEllipse.cxx:152
 TEllipse.cxx:153
 TEllipse.cxx:154
 TEllipse.cxx:155
 TEllipse.cxx:156
 TEllipse.cxx:157
 TEllipse.cxx:158
 TEllipse.cxx:159
 TEllipse.cxx:160
 TEllipse.cxx:161
 TEllipse.cxx:162
 TEllipse.cxx:163
 TEllipse.cxx:164
 TEllipse.cxx:165
 TEllipse.cxx:166
 TEllipse.cxx:167
 TEllipse.cxx:168
 TEllipse.cxx:169
 TEllipse.cxx:170
 TEllipse.cxx:171
 TEllipse.cxx:172
 TEllipse.cxx:173
 TEllipse.cxx:174
 TEllipse.cxx:175
 TEllipse.cxx:176
 TEllipse.cxx:177
 TEllipse.cxx:178
 TEllipse.cxx:179
 TEllipse.cxx:180
 TEllipse.cxx:181
 TEllipse.cxx:182
 TEllipse.cxx:183
 TEllipse.cxx:184
 TEllipse.cxx:185
 TEllipse.cxx:186
 TEllipse.cxx:187
 TEllipse.cxx:188
 TEllipse.cxx:189
 TEllipse.cxx:190
 TEllipse.cxx:191
 TEllipse.cxx:192
 TEllipse.cxx:193
 TEllipse.cxx:194
 TEllipse.cxx:195
 TEllipse.cxx:196
 TEllipse.cxx:197
 TEllipse.cxx:198
 TEllipse.cxx:199
 TEllipse.cxx:200
 TEllipse.cxx:201
 TEllipse.cxx:202
 TEllipse.cxx:203
 TEllipse.cxx:204
 TEllipse.cxx:205
 TEllipse.cxx:206
 TEllipse.cxx:207
 TEllipse.cxx:208
 TEllipse.cxx:209
 TEllipse.cxx:210
 TEllipse.cxx:211
 TEllipse.cxx:212
 TEllipse.cxx:213
 TEllipse.cxx:214
 TEllipse.cxx:215
 TEllipse.cxx:216
 TEllipse.cxx:217
 TEllipse.cxx:218
 TEllipse.cxx:219
 TEllipse.cxx:220
 TEllipse.cxx:221
 TEllipse.cxx:222
 TEllipse.cxx:223
 TEllipse.cxx:224
 TEllipse.cxx:225
 TEllipse.cxx:226
 TEllipse.cxx:227
 TEllipse.cxx:228
 TEllipse.cxx:229
 TEllipse.cxx:230
 TEllipse.cxx:231
 TEllipse.cxx:232
 TEllipse.cxx:233
 TEllipse.cxx:234
 TEllipse.cxx:235
 TEllipse.cxx:236
 TEllipse.cxx:237
 TEllipse.cxx:238
 TEllipse.cxx:239
 TEllipse.cxx:240
 TEllipse.cxx:241
 TEllipse.cxx:242
 TEllipse.cxx:243
 TEllipse.cxx:244
 TEllipse.cxx:245
 TEllipse.cxx:246
 TEllipse.cxx:247
 TEllipse.cxx:248
 TEllipse.cxx:249
 TEllipse.cxx:250
 TEllipse.cxx:251
 TEllipse.cxx:252
 TEllipse.cxx:253
 TEllipse.cxx:254
 TEllipse.cxx:255
 TEllipse.cxx:256
 TEllipse.cxx:257
 TEllipse.cxx:258
 TEllipse.cxx:259
 TEllipse.cxx:260
 TEllipse.cxx:261
 TEllipse.cxx:262
 TEllipse.cxx:263
 TEllipse.cxx:264
 TEllipse.cxx:265
 TEllipse.cxx:266
 TEllipse.cxx:267
 TEllipse.cxx:268
 TEllipse.cxx:269
 TEllipse.cxx:270
 TEllipse.cxx:271
 TEllipse.cxx:272
 TEllipse.cxx:273
 TEllipse.cxx:274
 TEllipse.cxx:275
 TEllipse.cxx:276
 TEllipse.cxx:277
 TEllipse.cxx:278
 TEllipse.cxx:279
 TEllipse.cxx:280
 TEllipse.cxx:281
 TEllipse.cxx:282
 TEllipse.cxx:283
 TEllipse.cxx:284
 TEllipse.cxx:285
 TEllipse.cxx:286
 TEllipse.cxx:287
 TEllipse.cxx:288
 TEllipse.cxx:289
 TEllipse.cxx:290
 TEllipse.cxx:291
 TEllipse.cxx:292
 TEllipse.cxx:293
 TEllipse.cxx:294
 TEllipse.cxx:295
 TEllipse.cxx:296
 TEllipse.cxx:297
 TEllipse.cxx:298
 TEllipse.cxx:299
 TEllipse.cxx:300
 TEllipse.cxx:301
 TEllipse.cxx:302
 TEllipse.cxx:303
 TEllipse.cxx:304
 TEllipse.cxx:305
 TEllipse.cxx:306
 TEllipse.cxx:307
 TEllipse.cxx:308
 TEllipse.cxx:309
 TEllipse.cxx:310
 TEllipse.cxx:311
 TEllipse.cxx:312
 TEllipse.cxx:313
 TEllipse.cxx:314
 TEllipse.cxx:315
 TEllipse.cxx:316
 TEllipse.cxx:317
 TEllipse.cxx:318
 TEllipse.cxx:319
 TEllipse.cxx:320
 TEllipse.cxx:321
 TEllipse.cxx:322
 TEllipse.cxx:323
 TEllipse.cxx:324
 TEllipse.cxx:325
 TEllipse.cxx:326
 TEllipse.cxx:327
 TEllipse.cxx:328
 TEllipse.cxx:329
 TEllipse.cxx:330
 TEllipse.cxx:331
 TEllipse.cxx:332
 TEllipse.cxx:333
 TEllipse.cxx:334
 TEllipse.cxx:335
 TEllipse.cxx:336
 TEllipse.cxx:337
 TEllipse.cxx:338
 TEllipse.cxx:339
 TEllipse.cxx:340
 TEllipse.cxx:341
 TEllipse.cxx:342
 TEllipse.cxx:343
 TEllipse.cxx:344
 TEllipse.cxx:345
 TEllipse.cxx:346
 TEllipse.cxx:347
 TEllipse.cxx:348
 TEllipse.cxx:349
 TEllipse.cxx:350
 TEllipse.cxx:351
 TEllipse.cxx:352
 TEllipse.cxx:353
 TEllipse.cxx:354
 TEllipse.cxx:355
 TEllipse.cxx:356
 TEllipse.cxx:357
 TEllipse.cxx:358
 TEllipse.cxx:359
 TEllipse.cxx:360
 TEllipse.cxx:361
 TEllipse.cxx:362
 TEllipse.cxx:363
 TEllipse.cxx:364
 TEllipse.cxx:365
 TEllipse.cxx:366
 TEllipse.cxx:367
 TEllipse.cxx:368
 TEllipse.cxx:369
 TEllipse.cxx:370
 TEllipse.cxx:371
 TEllipse.cxx:372
 TEllipse.cxx:373
 TEllipse.cxx:374
 TEllipse.cxx:375
 TEllipse.cxx:376
 TEllipse.cxx:377
 TEllipse.cxx:378
 TEllipse.cxx:379
 TEllipse.cxx:380
 TEllipse.cxx:381
 TEllipse.cxx:382
 TEllipse.cxx:383
 TEllipse.cxx:384
 TEllipse.cxx:385
 TEllipse.cxx:386
 TEllipse.cxx:387
 TEllipse.cxx:388
 TEllipse.cxx:389
 TEllipse.cxx:390
 TEllipse.cxx:391
 TEllipse.cxx:392
 TEllipse.cxx:393
 TEllipse.cxx:394
 TEllipse.cxx:395
 TEllipse.cxx:396
 TEllipse.cxx:397
 TEllipse.cxx:398
 TEllipse.cxx:399
 TEllipse.cxx:400
 TEllipse.cxx:401
 TEllipse.cxx:402
 TEllipse.cxx:403
 TEllipse.cxx:404
 TEllipse.cxx:405
 TEllipse.cxx:406
 TEllipse.cxx:407
 TEllipse.cxx:408
 TEllipse.cxx:409
 TEllipse.cxx:410
 TEllipse.cxx:411
 TEllipse.cxx:412
 TEllipse.cxx:413
 TEllipse.cxx:414
 TEllipse.cxx:415
 TEllipse.cxx:416
 TEllipse.cxx:417
 TEllipse.cxx:418
 TEllipse.cxx:419
 TEllipse.cxx:420
 TEllipse.cxx:421
 TEllipse.cxx:422
 TEllipse.cxx:423
 TEllipse.cxx:424
 TEllipse.cxx:425
 TEllipse.cxx:426
 TEllipse.cxx:427
 TEllipse.cxx:428
 TEllipse.cxx:429
 TEllipse.cxx:430
 TEllipse.cxx:431
 TEllipse.cxx:432
 TEllipse.cxx:433
 TEllipse.cxx:434
 TEllipse.cxx:435
 TEllipse.cxx:436
 TEllipse.cxx:437
 TEllipse.cxx:438
 TEllipse.cxx:439
 TEllipse.cxx:440
 TEllipse.cxx:441
 TEllipse.cxx:442
 TEllipse.cxx:443
 TEllipse.cxx:444
 TEllipse.cxx:445
 TEllipse.cxx:446
 TEllipse.cxx:447
 TEllipse.cxx:448
 TEllipse.cxx:449
 TEllipse.cxx:450
 TEllipse.cxx:451
 TEllipse.cxx:452
 TEllipse.cxx:453
 TEllipse.cxx:454
 TEllipse.cxx:455
 TEllipse.cxx:456
 TEllipse.cxx:457
 TEllipse.cxx:458
 TEllipse.cxx:459
 TEllipse.cxx:460
 TEllipse.cxx:461
 TEllipse.cxx:462
 TEllipse.cxx:463
 TEllipse.cxx:464
 TEllipse.cxx:465
 TEllipse.cxx:466
 TEllipse.cxx:467
 TEllipse.cxx:468
 TEllipse.cxx:469
 TEllipse.cxx:470
 TEllipse.cxx:471
 TEllipse.cxx:472
 TEllipse.cxx:473
 TEllipse.cxx:474
 TEllipse.cxx:475
 TEllipse.cxx:476
 TEllipse.cxx:477
 TEllipse.cxx:478
 TEllipse.cxx:479
 TEllipse.cxx:480
 TEllipse.cxx:481
 TEllipse.cxx:482
 TEllipse.cxx:483
 TEllipse.cxx:484
 TEllipse.cxx:485
 TEllipse.cxx:486
 TEllipse.cxx:487
 TEllipse.cxx:488
 TEllipse.cxx:489
 TEllipse.cxx:490
 TEllipse.cxx:491
 TEllipse.cxx:492
 TEllipse.cxx:493
 TEllipse.cxx:494
 TEllipse.cxx:495
 TEllipse.cxx:496
 TEllipse.cxx:497
 TEllipse.cxx:498
 TEllipse.cxx:499
 TEllipse.cxx:500
 TEllipse.cxx:501
 TEllipse.cxx:502
 TEllipse.cxx:503
 TEllipse.cxx:504
 TEllipse.cxx:505
 TEllipse.cxx:506
 TEllipse.cxx:507
 TEllipse.cxx:508
 TEllipse.cxx:509
 TEllipse.cxx:510
 TEllipse.cxx:511
 TEllipse.cxx:512
 TEllipse.cxx:513
 TEllipse.cxx:514
 TEllipse.cxx:515
 TEllipse.cxx:516
 TEllipse.cxx:517
 TEllipse.cxx:518
 TEllipse.cxx:519
 TEllipse.cxx:520
 TEllipse.cxx:521
 TEllipse.cxx:522
 TEllipse.cxx:523
 TEllipse.cxx:524
 TEllipse.cxx:525
 TEllipse.cxx:526
 TEllipse.cxx:527
 TEllipse.cxx:528
 TEllipse.cxx:529
 TEllipse.cxx:530
 TEllipse.cxx:531
 TEllipse.cxx:532
 TEllipse.cxx:533
 TEllipse.cxx:534
 TEllipse.cxx:535
 TEllipse.cxx:536
 TEllipse.cxx:537
 TEllipse.cxx:538
 TEllipse.cxx:539
 TEllipse.cxx:540
 TEllipse.cxx:541
 TEllipse.cxx:542
 TEllipse.cxx:543
 TEllipse.cxx:544
 TEllipse.cxx:545
 TEllipse.cxx:546
 TEllipse.cxx:547
 TEllipse.cxx:548
 TEllipse.cxx:549
 TEllipse.cxx:550
 TEllipse.cxx:551
 TEllipse.cxx:552
 TEllipse.cxx:553
 TEllipse.cxx:554
 TEllipse.cxx:555
 TEllipse.cxx:556
 TEllipse.cxx:557
 TEllipse.cxx:558
 TEllipse.cxx:559
 TEllipse.cxx:560
 TEllipse.cxx:561
 TEllipse.cxx:562
 TEllipse.cxx:563
 TEllipse.cxx:564
 TEllipse.cxx:565
 TEllipse.cxx:566
 TEllipse.cxx:567
 TEllipse.cxx:568
 TEllipse.cxx:569
 TEllipse.cxx:570
 TEllipse.cxx:571
 TEllipse.cxx:572
 TEllipse.cxx:573
 TEllipse.cxx:574
 TEllipse.cxx:575
 TEllipse.cxx:576
 TEllipse.cxx:577
 TEllipse.cxx:578
 TEllipse.cxx:579
 TEllipse.cxx:580
 TEllipse.cxx:581
 TEllipse.cxx:582
 TEllipse.cxx:583
 TEllipse.cxx:584
 TEllipse.cxx:585
 TEllipse.cxx:586
 TEllipse.cxx:587
 TEllipse.cxx:588
 TEllipse.cxx:589
 TEllipse.cxx:590
 TEllipse.cxx:591
 TEllipse.cxx:592
 TEllipse.cxx:593
 TEllipse.cxx:594
 TEllipse.cxx:595
 TEllipse.cxx:596
 TEllipse.cxx:597
 TEllipse.cxx:598
 TEllipse.cxx:599
 TEllipse.cxx:600
 TEllipse.cxx:601
 TEllipse.cxx:602
 TEllipse.cxx:603
 TEllipse.cxx:604
 TEllipse.cxx:605
 TEllipse.cxx:606
 TEllipse.cxx:607
 TEllipse.cxx:608
 TEllipse.cxx:609
 TEllipse.cxx:610
 TEllipse.cxx:611
 TEllipse.cxx:612
 TEllipse.cxx:613
 TEllipse.cxx:614
 TEllipse.cxx:615
 TEllipse.cxx:616
 TEllipse.cxx:617
 TEllipse.cxx:618
 TEllipse.cxx:619
 TEllipse.cxx:620
 TEllipse.cxx:621
 TEllipse.cxx:622
 TEllipse.cxx:623
 TEllipse.cxx:624
 TEllipse.cxx:625
 TEllipse.cxx:626
 TEllipse.cxx:627
 TEllipse.cxx:628
 TEllipse.cxx:629
 TEllipse.cxx:630
 TEllipse.cxx:631
 TEllipse.cxx:632
 TEllipse.cxx:633
 TEllipse.cxx:634
 TEllipse.cxx:635
 TEllipse.cxx:636
 TEllipse.cxx:637
 TEllipse.cxx:638
 TEllipse.cxx:639
 TEllipse.cxx:640
 TEllipse.cxx:641
 TEllipse.cxx:642
 TEllipse.cxx:643
 TEllipse.cxx:644
 TEllipse.cxx:645
 TEllipse.cxx:646
 TEllipse.cxx:647
 TEllipse.cxx:648
 TEllipse.cxx:649
 TEllipse.cxx:650
 TEllipse.cxx:651
 TEllipse.cxx:652
 TEllipse.cxx:653
 TEllipse.cxx:654
 TEllipse.cxx:655
 TEllipse.cxx:656
 TEllipse.cxx:657
 TEllipse.cxx:658
 TEllipse.cxx:659
 TEllipse.cxx:660
 TEllipse.cxx:661
 TEllipse.cxx:662
 TEllipse.cxx:663
 TEllipse.cxx:664
 TEllipse.cxx:665
 TEllipse.cxx:666
 TEllipse.cxx:667
 TEllipse.cxx:668
 TEllipse.cxx:669
 TEllipse.cxx:670
 TEllipse.cxx:671
 TEllipse.cxx:672
 TEllipse.cxx:673
 TEllipse.cxx:674
 TEllipse.cxx:675
 TEllipse.cxx:676
 TEllipse.cxx:677
 TEllipse.cxx:678
 TEllipse.cxx:679
 TEllipse.cxx:680
 TEllipse.cxx:681
 TEllipse.cxx:682
 TEllipse.cxx:683
 TEllipse.cxx:684
 TEllipse.cxx:685
 TEllipse.cxx:686
 TEllipse.cxx:687
 TEllipse.cxx:688
 TEllipse.cxx:689
 TEllipse.cxx:690
 TEllipse.cxx:691
 TEllipse.cxx:692
 TEllipse.cxx:693
 TEllipse.cxx:694
 TEllipse.cxx:695
 TEllipse.cxx:696
 TEllipse.cxx:697
 TEllipse.cxx:698
 TEllipse.cxx:699
 TEllipse.cxx:700
 TEllipse.cxx:701
 TEllipse.cxx:702
 TEllipse.cxx:703
 TEllipse.cxx:704
 TEllipse.cxx:705
 TEllipse.cxx:706
 TEllipse.cxx:707
 TEllipse.cxx:708
 TEllipse.cxx:709
 TEllipse.cxx:710
 TEllipse.cxx:711
 TEllipse.cxx:712
 TEllipse.cxx:713
 TEllipse.cxx:714
 TEllipse.cxx:715
 TEllipse.cxx:716
 TEllipse.cxx:717
 TEllipse.cxx:718
 TEllipse.cxx:719
 TEllipse.cxx:720
 TEllipse.cxx:721
 TEllipse.cxx:722
 TEllipse.cxx:723
 TEllipse.cxx:724
 TEllipse.cxx:725
 TEllipse.cxx:726
 TEllipse.cxx:727
 TEllipse.cxx:728
 TEllipse.cxx:729
 TEllipse.cxx:730
 TEllipse.cxx:731
 TEllipse.cxx:732
 TEllipse.cxx:733
 TEllipse.cxx:734
 TEllipse.cxx:735
 TEllipse.cxx:736
 TEllipse.cxx:737
 TEllipse.cxx:738
 TEllipse.cxx:739
 TEllipse.cxx:740
 TEllipse.cxx:741
 TEllipse.cxx:742
 TEllipse.cxx:743
 TEllipse.cxx:744
 TEllipse.cxx:745
 TEllipse.cxx:746
 TEllipse.cxx:747
 TEllipse.cxx:748
 TEllipse.cxx:749
 TEllipse.cxx:750
 TEllipse.cxx:751
 TEllipse.cxx:752
 TEllipse.cxx:753
 TEllipse.cxx:754
 TEllipse.cxx:755
 TEllipse.cxx:756
 TEllipse.cxx:757
 TEllipse.cxx:758
 TEllipse.cxx:759
 TEllipse.cxx:760
 TEllipse.cxx:761
 TEllipse.cxx:762
 TEllipse.cxx:763
 TEllipse.cxx:764
 TEllipse.cxx:765
 TEllipse.cxx:766
 TEllipse.cxx:767
 TEllipse.cxx:768
 TEllipse.cxx:769
 TEllipse.cxx:770
 TEllipse.cxx:771