diff --git a/graf/inc/TPave.h b/graf/inc/TPave.h index ee02f96c227407a87de45b5e768fddee98d5ad7e..8b17b2ea91d23292ca0ef94076dccb7d132beae4 100644 --- a/graf/inc/TPave.h +++ b/graf/inc/TPave.h @@ -1,4 +1,4 @@ -// @(#)root/graf:$Name: $:$Id: TPave.h,v 1.8 2006/04/12 13:45:28 brun Exp $ +// @(#)root/graf:$Name: $:$Id: TPave.h,v 1.9 2006/07/03 16:10:44 brun Exp $ // Author: Rene Brun 16/10/95 /************************************************************************* @@ -37,6 +37,7 @@ protected: Double_t fY2NDC; //Y2 point in NDC coordinates Int_t fBorderSize; //window box bordersize in pixels Int_t fInit; //(=0 if transformation to NDC not yet done) + Int_t fShadowColor; //Color of the pave's shadow Double_t fCornerRadius; //Corner radius in case of option arc TString fOption; //Pave style TString fName; //Pave name @@ -63,6 +64,7 @@ public: Double_t GetCornerRadius() const {return fCornerRadius;} Option_t *GetName() const {return fName.Data();} Option_t *GetOption() const {return fOption.Data();} + Int_t GetShadowColor() const {return fShadowColor;} Double_t GetX1NDC() const {return fX1NDC;} Double_t GetX2NDC() const {return fX2NDC;} Double_t GetY1NDC() const {return fY1NDC;} @@ -81,12 +83,13 @@ public: virtual void SetCornerRadius(Double_t rad = 0.2) {fCornerRadius = rad;} // *MENU* virtual void SetName(const char *name="") {fName = name;} // *MENU* virtual void SetOption(Option_t *option="br") {fOption = option;} + virtual void SetShadowColor(Int_t color) {fShadowColor=color;} // *MENU* virtual void SetX1NDC(Double_t x1) {fX1NDC=x1;} virtual void SetX2NDC(Double_t x2) {fX2NDC=x2;} virtual void SetY1NDC(Double_t y1) {fY1NDC=y1;} virtual void SetY2NDC(Double_t y2) {fY2NDC=y2;} - ClassDef(TPave,2) //Pave. A box with shadowing + ClassDef(TPave,3) //Pave. A box with shadowing }; #endif diff --git a/graf/src/TPave.cxx b/graf/src/TPave.cxx index 85c797109eac04f9be8d1895e9a9afaa4c2c2099..3c3cc39e5fbab7e05fb0939f9093a301ff4293a1 100644 --- a/graf/src/TPave.cxx +++ b/graf/src/TPave.cxx @@ -1,4 +1,4 @@ -// @(#)root/graf:$Name: $:$Id: TPave.cxx,v 1.22 2006/07/03 16:10:45 brun Exp $ +// @(#)root/graf:$Name: $:$Id: TPave.cxx,v 1.23 2007/02/06 14:35:45 brun Exp $ // Author: Rene Brun 16/10/95 /************************************************************************* @@ -49,6 +49,7 @@ TPave::TPave(): TBox() SetFillStyle(gStyle->GetFillStyle()); SetLineColor(gStyle->GetLineColor()); SetLineStyle(gStyle->GetLineStyle()); + fShadowColor = GetLineColor(); } @@ -86,6 +87,7 @@ TPave::TPave(Double_t x1, Double_t y1,Double_t x2, Double_t y2, SetLineColor(gStyle->GetLineColor()); SetLineStyle(gStyle->GetLineStyle()); SetName((char*)ClassName()); + fShadowColor = GetLineColor(); } @@ -167,6 +169,7 @@ void TPave::Copy(TObject &obj) const ((TPave&)obj).fOption = fOption; ((TPave&)obj).fName = fName; ((TPave&)obj).fCornerRadius= fCornerRadius; + ((TPave&)obj).fShadowColor = fShadowColor; } //______________________________________________________________________________ @@ -318,7 +321,7 @@ void TPave::PaintPave(Double_t x1, Double_t y1,Double_t x2, Double_t y2, if (opt.Length() == 0) opt ="br"; Int_t fillstyle = GetFillStyle(); Int_t fillcolor = GetFillColor(); - Int_t linecolor = GetLineColor(); + Int_t shadowcolor = GetShadowColor(); // Draw first pave as a normal filled box if (fBorderSize <= 0 && fillstyle <= 0) return; @@ -384,7 +387,7 @@ void TPave::PaintPave(Double_t x1, Double_t y1,Double_t x2, Double_t y2, } x[6] = x[0]; y[6] = y[0]; SetFillStyle(1001); - SetFillColor(linecolor); + SetFillColor(shadowcolor); TAttFill::Modify(); gPad->PaintFillArea(6,x,y); x[0] = x1; y[0] = y1; @@ -413,7 +416,7 @@ void TPave::PaintPaveArc(Double_t x1, Double_t y1, Double_t x2, Double_t y2, if (opt.Length() == 0) opt ="br"; Int_t fillstyle = GetFillStyle(); Int_t fillcolor = GetFillColor(); - Int_t linecolor = GetLineColor(); + Int_t shadowcolor = GetShadowColor(); static Double_t cosa[kNPARC], sina[kNPARC]; static Bool_t done = kFALSE; @@ -588,7 +591,7 @@ void TPave::PaintPaveArc(Double_t x1, Double_t y1, Double_t x2, Double_t y2, np += 3; } SetFillStyle(1001); - SetFillColor(linecolor); + SetFillColor(shadowcolor); TAttFill::Modify(); for (i=0;i<=np;i++) { x[i] = gPad->AbsPixeltoX(Int_t(px[i]));