ROOT logo
// @(#)root/graf:$Id: TPave.cxx 31650 2009-12-08 13:09:09Z couet $
// 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 "Riostream.h"
#include "TROOT.h"
#include "TPave.h"
#include "TStyle.h"
#include "TVirtualPad.h"
#include "TClass.h"
#include "TMath.h"


ClassImp(TPave)


//______________________________________________________________________________
//
// a PAVE is a TBox with a bordersize and a shadow option
// The corners of a TPave can be rounded (option "arc")
// More functional objects like TPavelabel, TPaveText derive from TPave.
//
//Begin_Html
/*
<img src="gif/pave.gif">
*/
//End_Html
//


//______________________________________________________________________________
TPave::TPave(): TBox()
{
   // Pave default constructor.

   fBorderSize   = 4;
   fOption       = "brNDC";
   fName         = "";
   fInit         = 1;
   fCornerRadius = 0;
   SetFillColor(gStyle->GetFillColor());
   SetFillStyle(gStyle->GetFillStyle());
   SetLineColor(gStyle->GetLineColor());
   SetLineStyle(gStyle->GetLineStyle());
   fShadowColor  = GetLineColor();
}


//______________________________________________________________________________
TPave::TPave(Double_t x1, Double_t y1,Double_t x2, Double_t  y2,
             Int_t bordersize ,Option_t *option)
       :TBox(x1,y1,x2,y2)
{
   // Pave normal constructor.
   //
   // a PAVE is a box with a bordersize and a shadow option
   // the bordersize is in pixels
   //  option = "T" Top frame
   //  option = "B" Bottom frame
   //  option = "R" Right frame
   //  option = "L" Left frame
   //  option = "NDC" x1,y1,x2,y2 are given in NDC
   //  option = "ARC" corners are rounded
   //
   //  IMPORTANT NOTE:
   //  Because TPave objects (and objects deriving from TPave) have their
   //  master coordinate system in NDC, one cannot use the TBox functions
   //  SetX1,SetY1,SetX2,SetY2 to change the corner coordinates. One should use
   //  instead SetX1NDC, SetY1NDC, SetX2NDC, SetY2NDC.

   fBorderSize   = bordersize;
   fOption       = option;
   fName         = "";
   fInit         = 0;
   fCornerRadius = 0;
   if (fOption == "NDC" || fOption == "ndc") fOption = "brNDC";

   SetFillColor(gStyle->GetFillColor());
   SetFillStyle(gStyle->GetFillStyle());
   SetLineColor(gStyle->GetLineColor());
   SetLineStyle(gStyle->GetLineStyle());
   SetName((char*)ClassName());
   fShadowColor  = GetLineColor();
}


//______________________________________________________________________________
TPave::~TPave()
{
   // Pave default destructor.
}


//______________________________________________________________________________
TPave::TPave(const TPave &pave) : TBox(pave)
{
   // Pave copy constructor.

   fX1NDC        = 0.;
   fY1NDC        = 0.;
   fX2NDC        = 0.;
   fY2NDC        = 0.;
   fCornerRadius = 0.;
   fBorderSize   = 0;
   fInit         = 0;
   fShadowColor  = 0;

   ((TPave&)pave).TPave::Copy(*this);
}


//______________________________________________________________________________
void TPave::ConvertNDCtoPad()
{
   // Convert pave coordinates from NDC to Pad coordinates.

   Double_t dpx  = gPad->GetX2() - gPad->GetX1();
   Double_t dpy  = gPad->GetY2() - gPad->GetY1();
   Double_t xp1  = gPad->GetX1();
   Double_t yp1  = gPad->GetY1();

   // Check if pave initialisation has been done.
   // This operation cannot take place in the Pave constructor because
   // the Pad range may not be known at this time.
   if (!fInit) {
      fInit = 1;
      if (fOption.Contains("NDC")) {
         fX1NDC = fX1;
         fY1NDC = fY1;
         fX2NDC = fX2;
         fY2NDC = fY2;
         fX1    = xp1 + fX1NDC*dpx;
         fY1    = yp1 + fY1NDC*dpy;
         fX2    = xp1 + fX2NDC*dpx;
         fY2    = yp1 + fY2NDC*dpy;
      } else {
         if (gPad->GetLogx()) {
            if (fX1 > 0) fX1 = TMath::Log10(fX1);
            if (fX2 > 0) fX2 = TMath::Log10(fX2);
         }
         if (gPad->GetLogy()) {
            if (fY1 > 0) fY1 = TMath::Log10(fY1);
            if (fY2 > 0) fY2 = TMath::Log10(fY2);
         }
         fX1NDC = (fX1-xp1)/dpx;
         fY1NDC = (fY1-yp1)/dpy;
         fX2NDC = (fX2-xp1)/dpx;
         fY2NDC = (fY2-yp1)/dpy;
      }
   } else {
      fX1    = xp1 + fX1NDC*dpx;
      fY1    = yp1 + fY1NDC*dpy;
      fX2    = xp1 + fX2NDC*dpx;
      fY2    = yp1 + fY2NDC*dpy;
   }
}


//______________________________________________________________________________
void TPave::Copy(TObject &obj) const
{
   // Copy this pave to pave.

   TBox::Copy(obj);
   ((TPave&)obj).fX1NDC       = fX1NDC;
   ((TPave&)obj).fY1NDC       = fY1NDC;
   ((TPave&)obj).fX2NDC       = fX2NDC;
   ((TPave&)obj).fY2NDC       = fY2NDC;
   ((TPave&)obj).fBorderSize  = fBorderSize;
   ((TPave&)obj).fInit        = fInit;
   ((TPave&)obj).fOption      = fOption;
   ((TPave&)obj).fName        = fName;
   ((TPave&)obj).fCornerRadius= fCornerRadius;
   ((TPave&)obj).fShadowColor = fShadowColor;
}

//______________________________________________________________________________
Int_t TPave::DistancetoPrimitive(Int_t px, Int_t py)
{
   // Compute distance from point px,py to a pave.
   //
   // Compute the closest distance of approach from point px,py to the
   // edges of this pave.
   // The distance is computed in pixels units.

   Int_t pxl, pyl, pxt, pyt;
   Int_t px1 = gPad->XtoAbsPixel(fX1);
   Int_t py1 = gPad->YtoAbsPixel(fY1);
   Int_t px2 = gPad->XtoAbsPixel(fX2);
   Int_t py2 = gPad->YtoAbsPixel(fY2);
   if (px1 < px2) {pxl = px1; pxt = px2;}
   else           {pxl = px2; pxt = px1;}
   if (py1 < py2) {pyl = py1; pyt = py2;}
   else           {pyl = py2; pyt = py1;}

   // Are we inside the box?
   if ( (px >= pxl && px <= pxt) && (py >= pyl && py <= pyt) ) return 0;
   else return 9999;
}



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

   Option_t *opt;
   if (option && strlen(option)) opt = option;
   else                          opt = GetOption();

   AppendPad(opt);
}


//______________________________________________________________________________
void TPave::DrawPave(Double_t x1, Double_t y1,Double_t x2, Double_t  y2,
                     Int_t bordersize ,Option_t *option)
{
   // Draw this pave with new coordinates.

   TPave *newpave = new TPave(x1,y1,x2,y2,bordersize,option);
   newpave->SetBit(kCanDelete);
   newpave->AppendPad(option);
}


//______________________________________________________________________________
void TPave::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
   // Execute action corresponding to one event.
   //
   //  This member function is called when a PAVE object is clicked.

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

   TBox::ExecuteEvent(event, px, py);

   // In case pave coordinates have been modified, recompute NDC coordinates
   Double_t dpx  = gPad->GetX2() - gPad->GetX1();
   Double_t dpy  = gPad->GetY2() - gPad->GetY1();
   Double_t xp1  = gPad->GetX1();
   Double_t yp1  = gPad->GetY1();
   fX1NDC = (fX1-xp1)/dpx;
   fY1NDC = (fY1-yp1)/dpy;
   fX2NDC = (fX2-xp1)/dpx;
   fY2NDC = (fY2-yp1)/dpy;

   // In case the bit NameIsAction is activated, execute the action
   // in name via the interpreter.
   if (event == kButton1Double) {
      if (TestBit(kNameIsAction)) gROOT->ProcessLine(GetName());
   }
}


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

   TROOT::IndentLevel();
   printf("OBJ: %s\t%s  \tX1= %f Y1=%f X2=%f Y2=%f\n",IsA()->GetName(),GetName(),fX1,fY1,fX2,fY2);
}


//______________________________________________________________________________
void TPave::Paint(Option_t *option)
{
   // Paint this pave with its current attributes.
   //
   //  option = "T" Top frame
   //  option = "B" Bottom frame
   //  option = "R" Right frame
   //  option = "L" Left frame
   //  option = "NDC" x1,y1,x2,y2 are given in NDC
   //  option = "ARC" corners are rounded
   //      In case of option "ARC", the corner radius is specified
   //      via TPave::SetCornerRadius(rad) where rad is given in percent
   //      of the pave height (default value is 0.2).

   // Convert from NDC to pad coordinates
   ConvertNDCtoPad();

   PaintPave(fX1, fY1, fX2, fY2, fBorderSize, option);
}


//______________________________________________________________________________
void TPave::PaintPave(Double_t x1, Double_t y1,Double_t x2, Double_t  y2,
                      Int_t bordersize ,Option_t *option)
{
   // Draw this pave with new coordinates.

   Double_t x[7],y[7];
   TString opt = option;
   opt.ToLower();
   // if pave drawn with the arc option, goes through dedicated function
   if (opt.Contains("arc")) {
      PaintPaveArc(x1,y1,x2,y2,bordersize,option);
      return;
   }

   // normal rectangular pave
   if (opt.Length() == 0) opt ="br";
   Int_t fillstyle = GetFillStyle();
   Int_t fillcolor = GetFillColor();
   Int_t shadowcolor = GetShadowColor();

   // Draw first pave as a normal filled box
   if (fBorderSize <= 0 && fillstyle <= 0) return;
   TBox::PaintBox(x1,y1,x2,y2);
   if (fBorderSize <= 0) return;
   if (fBorderSize == 1) {
      gPad->PaintLine(x1,y1,x2,y1);
      gPad->PaintLine(x2,y1,x2,y2);
      gPad->PaintLine(x2,y2,x1,y2);
      gPad->PaintLine(x1,y2,x1,y1);
      return;
   }

   Double_t wy = gPad->PixeltoY(0) - gPad->PixeltoY(fBorderSize);
   Double_t wx = gPad->PixeltoX(fBorderSize) - gPad->PixeltoX(0);
   Int_t mode = 0;
   //*-*- Draw the frame top right
   if (opt.Contains("t") && opt.Contains("r")) {
      mode = 1;
      x[0] = x1 + 1.5*wx;     y[0] = y2;
      x[1] = x[0];            y[1] = y2 + wy;
      x[2] = x2 + wx;         y[2] = y[1];
      x[3] = x[2];            y[3] = y1 + 1.5*wy;
      x[4] = x2;              y[4] = y[3];
      x[5] = x[4];            y[5] = y2;
   }
   // Draw the frame top left
   if (opt.Contains("t") && opt.Contains("l")) {
      mode = 2;
      x[0] = x1 - wx;         y[0] = y1 + 1.5*wy;
      x[1] = x[0];            y[1] = y2 + wy;
      x[2] = x2 - 1.5*wx;     y[2] = y[1];
      x[3] = x[2];            y[3] = y2;
      x[4] = x1;              y[4] = y[3];
      x[5] = x1;              y[5] = y[0];
   }
   // Draw the frame bottom right
   if (opt.Contains("b") && opt.Contains("r")) {
      mode = 3;
      x[0] = x1 + 1.5*wx;     y[0] = y1;
      x[1] = x[0];            y[1] = y1 - wy;
      x[2] = x2 + wx;         y[2] = y[1];
      x[3] = x[2];            y[3] = y2 - 1.5*wy;
      x[4] = x2;              y[4] = y[3];
      x[5] = x[4];            y[5] = y1;
   }
   // Draw the frame bottom left
   if (opt.Contains("b") && opt.Contains("l")) {
      mode = 4;
      x[0] = x1 - wx;         y[0] = y2 - 1.5*wy;
      x[1] = x[0];            y[1] = y1 - wy;
      x[2] = x2 - 1.5*wx;     y[2] = y[1];
      x[3] = x[2];            y[3] = y1;
      x[4] = x1;              y[4] = y[3];
      x[5] = x[4];            y[5] = y[0];
   }
   if (!mode) return;  // nop border mode option specified
   for (Int_t i=0;i<6;i++) {
      if (x[i] < gPad->GetX1()) x[i] = gPad->GetX1();
      if (x[i] > gPad->GetX2()) x[i] = gPad->GetX2();
      if (y[i] < gPad->GetY1()) y[i] = gPad->GetY1();
      if (y[i] > gPad->GetY2()) y[i] = gPad->GetY2();
   }
   x[6] = x[0];   y[6] = y[0];
   SetFillStyle(1001);
   SetFillColor(shadowcolor);
   TAttFill::Modify();
   gPad->PaintFillArea(6,x,y);
   x[0] = x1;  y[0] = y1;
   x[1] = x1;  y[1] = y2;
   x[2] = x2;  y[2] = y2;
   x[3] = x2;  y[3] = y1;
   x[4] = x1;  y[4] = y1;
   gPad->PaintPolyLine(5,x,y);
   SetFillStyle(fillstyle);
   SetFillColor(fillcolor);
}


//______________________________________________________________________________
void TPave::PaintPaveArc(Double_t x1, Double_t y1, Double_t x2, Double_t y2,
                      Int_t, Option_t *option)
{
   // Draw this pave with rounded corners.

   const Int_t kNPARC = 10;
   Double_t x[4*kNPARC+10],   y[4*kNPARC+10];
   Double_t px[4*kNPARC+10], py[4*kNPARC+10];
   Int_t i;
   TString opt = option;
   opt.ToLower();
   if (opt.Length() == 0) opt ="br";
   Int_t fillstyle = GetFillStyle();
   Int_t fillcolor = GetFillColor();
   Int_t shadowcolor = GetShadowColor();

   static Double_t cosa[kNPARC], sina[kNPARC];
   static Bool_t done = kFALSE;
   if (!done) {
      done = kTRUE;
      Double_t dtheta = 0.5*3.141592/(kNPARC+1);
      Double_t theta = 0;
      for (i=0;i<kNPARC;i++) {
         theta += dtheta;
         cosa[i] = TMath::Cos(theta);
         sina[i] = TMath::Sin(theta);
      }
   }
   Int_t px1 = gPad->XtoAbsPixel(x1);
   Int_t py1 = gPad->YtoAbsPixel(y1);
   Int_t px2 = gPad->XtoAbsPixel(x2);
   Int_t py2 = gPad->YtoAbsPixel(y2);
   // compute rounded corner radius
   Double_t rad = fCornerRadius;
   if (rad > 0 && rad < 0.5) rad = fCornerRadius;
   else                      rad = 0.2;
   Double_t r = rad*TMath::Abs(py1-py2);
   if (r > 0.5*TMath::Abs(px2-px1)) r = 0.5*TMath::Abs(px2-px1);
   if (r == 0) r = 1;

   // Draw rounded box outline and fill area
   px[0] = px2;  py[0] = py1 - r;  //starts at bottom right
   px[1] = px2;  py[1] = py2 + r;
   Int_t np = 2;
   for (i=0;i<kNPARC;i++) {          //top right corner
      px[np] = px2 - r + r*cosa[i];
      py[np] = py2 + r - r*sina[i];
      np++;
   }
   px[np]   = px2 - r;  py[np]   = py2;
   px[np+1] = px1 + r;  py[np+1] = py2;
   np += 2;
   for (i=kNPARC-1;i>=0;i--) {       //top left corner
      px[np] = px1 + r - r*cosa[i];
      py[np] = py2 + r - r*sina[i];
      np++;
   }
   px[np]   = px1;  py[np]   = py2 + r;
   px[np+1] = px1;  py[np+1] = py1 - r;
   np += 2;
   for (i=0;i<kNPARC;i++) {          //bottom left corner
      px[np] = px1 + r - r*cosa[i];
      py[np] = py1 - r + r*sina[i];
      np++;
   }
   px[np]   = px1 + r;  py[np]   = py1;
   px[np+1] = px2 - r;  py[np+1] = py1;
   np += 2;
   for (i=kNPARC-1;i>=0;i--) {       //bottom right corner
      px[np] = px2 - r + r*cosa[i];
      py[np] = py1 - r + r*sina[i];
      np++;
   }
   px[np] = px[0];  py[np] =py[0];
   TAttLine::Modify();
   TAttFill::Modify();
   for (i=0;i<=np;i++) {
      x[i] = gPad->AbsPixeltoX(Int_t(px[i]));
      y[i] = gPad->AbsPixeltoY(Int_t(py[i]));
   }
   gPad->PaintFillArea(np  , x, y);
   gPad->PaintPolyLine(np+1, x, y);


   if (fBorderSize <= 0) return;

   Double_t wy    = fBorderSize;
   Double_t wx    = fBorderSize;
   // Draw the frame top right
   if (opt.Contains("tr")) {
      px[0] = px2;           py[0] = py1 - r;
      px[1] = px2;           py[1] = py2 + r;
      np = 2;
      for (i=0;i<kNPARC;i++) {       //top right corner inside
         px[np] = px2 - r + r*cosa[i];
         py[np] = py2 + r - r*sina[i];
         np++;
      }
      px[np]   = px2 - r;       py[np]   = py2;
      px[np+1] = px1 + r;       py[np+1] = py2;
      px[np+2] = px1 + r;       py[np+2] = py2 - wy;
      px[np+3] = px2 - r;       py[np+3] = py2 - wy;
      np += 4;
      for (i=kNPARC-1;i>=0;i--) {       //top right corner outside
         px[np] = px2 - r + r*cosa[i]*(1+wx/r);
         py[np] = py2 + r - r*sina[i]*(1+wy/r);
         np++;
      }
      px[np]   = px2 + wx;    py[np]   = py2 + r;
      px[np+1] = px2 + wx;    py[np+1] = py1 - r;
      px[np+2] = px[0];       py[np+2] = py[0];
      np += 3;
   }
   // Draw the frame top left
   if (opt.Contains("tl")) {
      px[0] = px2 - r;           py[0] = py2;
      px[1] = px1 + r;           py[1] = py2;
      np = 2;
      for (i=kNPARC-1;i>=0;i--) {       //top left corner inside
         px[np] = px1 + r - r*cosa[i];
         py[np] = py2 + r - r*sina[i];
         np++;
      }
      px[np]   = px1;       py[np]   = py2 + r;
      px[np+1] = px1;       py[np+1] = py1 - r;
      px[np+2] = px1 - wx;  py[np+2] = py1 - r;
      px[np+3] = px1 - wx;  py[np+3] = py2 + r;
      np += 4;
      for (i=0;i<kNPARC;i++) {       //top left corner outside
         px[np] = px1 + r - r*cosa[i]*(1+wx/r);
         py[np] = py2 + r - r*sina[i]*(1+wy/r);
         np++;
      }
      px[np]   = px1 + r;    py[np]   = py2 - wy;
      px[np+1] = px2 - r;    py[np+1] = py2 - wy;
      px[np+2] = px[0];      py[np+2] = y[0];
      np += 3;
   }
   // Draw the frame bottom right
   if (opt.Contains("br")) {
      px[0] = px1 + r;           py[0] = py1;
      px[1] = px2 - r;           py[1] = py1;
      np = 2;
      for (i=kNPARC-1;i>=0;i--) {       //bottom right corner inside
         px[np] = px2 - r + r*cosa[i];
         py[np] = py1 - r + r*sina[i];
         np++;
      }
      px[np]   = px2;       py[np]   = py1 - r;
      px[np+1] = px2;       py[np+1] = py2 + r;
      px[np+2] = px2 + wx;  py[np+2] = py2 + r;
      px[np+3] = px2 + wx;  py[np+3] = py1 - r;
      np += 4;
      for (i=0;i<kNPARC;i++) {       //bottom right corner outside
         px[np] = px2 - r + r*cosa[i]*(1+wx/r);
         py[np] = py1 - r + r*sina[i]*(1+wy/r);
         np++;
      }
      px[np]   = px2 - r;    py[np]   = py1 + wy;
      px[np+1] = px[0];      py[np+1] = py[0] + wy;
      px[np+2] = px[0];      py[np+2] = py[0];
      np += 3;
   }
   // Draw the frame bottom left
   if (opt.Contains("bl")) {
      px[0] = px1;           py[0] = py2 + r;
      px[1] = px1;           py[1] = py1 - r;
      np = 2;
      for (i=0;i<kNPARC;i++) {          //bottom left corner inside
         px[np] = px1 + r - r*cosa[i];
         py[np] = py1 + r - r*sina[i];
         np++;
      }
      px[np]   = px1 + r;       py[np]   = py1;
      px[np+1] = px2 - r;       py[np+1] = py1;
      px[np+2] = px2 - r;       py[np+2] = py1 + wy;
      px[np+3] = px1 + r;       py[np+3] = py1 + wy;
      np += 4;
      for (i=kNPARC-1;i>=0;i--) {       //bottom left corner outside
         px[np] = px1 + r - r*cosa[i]*(1+wx/r);
         py[np] = py1 - r + r*sina[i]*(1+wy/r);
         np++;
      }
      px[np]   = px1 - wx;    py[np]   = py1 - r;
      px[np+1] = px1 - wx;    py[np+1] = py[0];
      px[np+2] = px[0];       py[np+2] = py[0];
      np += 3;
   }
   SetFillStyle(1001);
   SetFillColor(shadowcolor);
   TAttFill::Modify();
   for (i=0;i<=np;i++) {
      x[i] = gPad->AbsPixeltoX(Int_t(px[i]));
      y[i] = gPad->AbsPixeltoY(Int_t(py[i]));
   }
   gPad->PaintFillArea(np,x,y);
   SetFillStyle(fillstyle);
   SetFillColor(fillcolor);
}


//______________________________________________________________________________
void TPave::Print(Option_t *option) const
{
   // Dump this pave with its attributes.

   TBox::Print(option);
}


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

   char quote = '"';
   if (gROOT->ClassSaved(TPave::Class())) {
      out<<"   ";
   } else {
      out<<"   TPave *";
   }
   if (fOption.Contains("NDC")) {
      out<<"pave = new TPave("<<fX1NDC<<","<<fY1NDC<<","<<fX2NDC<<","<<fY2NDC
         <<","<<fBorderSize<<","<<quote<<fOption<<quote<<");"<<endl;
   } else {
      out<<"pave = new TPave("<<fX1<<","<<fY1<<","<<fX2<<","<<fY2
         <<","<<fBorderSize<<","<<quote<<fOption<<quote<<");"<<endl;
   }
   if (strcmp(GetName(),"TPave")) {
      out<<"   pave->SetName("<<quote<<GetName()<<quote<<");"<<endl;
   }
   if (fCornerRadius) {
      out<<"   pave->SetCornerRadius("<<fCornerRadius<<");"<<endl;
   }
   SaveFillAttributes(out,"pave",19,1001);
   SaveLineAttributes(out,"pave",1,1,1);
   out<<"   pave->Draw();"<<endl;
}


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

   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(TPave::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TBox::Streamer(R__b);
      Float_t x1ndc,y1ndc,x2ndc,y2ndc,rad;
      R__b >> x1ndc; fX1NDC = x1ndc;
      R__b >> y1ndc; fY1NDC = y1ndc;
      R__b >> x2ndc; fX2NDC = x2ndc;
      R__b >> y2ndc; fY2NDC = y2ndc;
      R__b >> fBorderSize;
      R__b >> fInit;
      R__b >> rad;   fCornerRadius = rad;
      fOption.Streamer(R__b);
      fName.Streamer(R__b);
      R__b.CheckByteCount(R__s, R__c, TPave::IsA());
      //====end of old versions

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