Public Member Functions | List of all members
evdb::TBoxClipped Class Reference
Inheritance diagram for evdb::TBoxClipped:

Public Member Functions

 TBoxClipped (double a, double b, double c, double d)
 
virtual void Paint (Option_t *option)
 

Detailed Description

Definition at line 18 of file View2D.cxx.

Constructor & Destructor Documentation

evdb::TBoxClipped::TBoxClipped ( double  a,
double  b,
double  c,
double  d 
)
inline

Definition at line 21 of file View2D.cxx.

21 : TBox(a, b, c, d){}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
static bool * b
Definition: config.cpp:1043

Member Function Documentation

virtual void evdb::TBoxClipped::Paint ( Option_t *  option)
inlinevirtual

Definition at line 22 of file View2D.cxx.

23  {
24  const double ux1 = gPad->GetUxmin(), uy1 = gPad->GetUymin();
25  const double ux2 = gPad->GetUxmax(), uy2 = gPad->GetUymax();
26  // Completely outside frame
27  if(!gPad->GetLogx()){
28  if(fX1 < ux1 && fX2 < ux1) return;
29  if(fX1 > ux2 && fX2 > ux2) return;
30  }
31  if(!gPad->GetLogy()){
32  if(fY1 < uy1 && fY2 < uy1) return;
33  if(fY1 > uy2 && fY2 > uy2) return;
34  }
35 
36  // Store the parameters for restoration later
37  const double x1 = fX1, y1 = fY1, x2 = fX2, y2 = fY2;
38 
39  // Clip corners to avoid painting outside of the frame (TBox doesn't do
40  // this by default)
41  if(!gPad->GetLogx()){
42  if(fX1 < ux1) fX1 = ux1;
43  if(fX2 > ux2) fX2 = ux2;
44  }
45  if(!gPad->GetLogy()){
46  if(fY1 < uy1) fY1 = uy1;
47  if(fY2 > uy2) fY2 = uy2;
48  }
49 
50  TBox::Paint(option);
51 
52  // Put the real parameters back
53  fX1 = x1; fX2 = x2; fY1 = y1; fY2 = y2;
54 
55  // NB: clipped boxes overdraw axis lines, caller might want to call
56  // Draw("axis same") on their containing histogram.
57  }

The documentation for this class was generated from the following file: