LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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.

Referenced by evdb::View2D::AddBox().

21 : TBox(a, b, c, d){}
Float_t d
Definition: plot.C:235

Member Function Documentation

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

Definition at line 22 of file View2D.cxx.

References evdb::View2D::fgArcL, evdb::View2D::fgBoxL, evdb::View2D::fgLatexL, evdb::View2D::fgLineL, evdb::View2D::fgMarkerL, evdb::View2D::fgPolyLineL, evdb::View2D::fgPolyMarkerL, evdb::View2D::fgTextL, x1, x2, y1, and y2.

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  }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
Float_t y2[n_points_geant4]
Definition: compare.C:26
Float_t x2[n_points_geant4]
Definition: compare.C:26

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