BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
BesPaveText Class Reference

#include <BesPaveText.h>

+ Inheritance diagram for BesPaveText:

Public Member Functions

 BesPaveText ()
 
 BesPaveText (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="br")
 
 BesPaveText (const BesPaveText &pavetext)
 
virtual void SetText (std::vector< TString > infoCon)
 
virtual void SetPos (Int_t px, Int_t py)
 
 BesPaveText ()
 
 BesPaveText (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="br")
 
 BesPaveText (const BesPaveText &pavetext)
 
virtual void SetText (std::vector< TString > infoCon)
 
virtual void SetPos (Int_t px, Int_t py)
 

Protected Attributes

Double_t fTextSize
 
Double_t fdxNDC
 
Double_t fdyNDC
 

Detailed Description

Constructor & Destructor Documentation

◆ BesPaveText() [1/6]

BesPaveText::BesPaveText ( )

◆ BesPaveText() [2/6]

BesPaveText::BesPaveText ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2,
Option_t *  option = "br" 
)

Definition at line 18 of file BesPaveText.cxx.

19 :TPaveText(x1,y1,x2,y2,option)
20{
21 SetFillColor(1001);
22 SetBorderSize(1);
23 SetCornerRadius(0.2);
24
25 fTextSize = 0.025;
26}

◆ BesPaveText() [3/6]

BesPaveText::BesPaveText ( const BesPaveText pavetext)

Definition at line 29 of file BesPaveText.cxx.

29 : TPaveText()
30{
31
32}

◆ BesPaveText() [4/6]

BesPaveText::BesPaveText ( )

◆ BesPaveText() [5/6]

BesPaveText::BesPaveText ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2,
Option_t *  option = "br" 
)

◆ BesPaveText() [6/6]

BesPaveText::BesPaveText ( const BesPaveText pavetext)

Member Function Documentation

◆ SetPos() [1/2]

void BesPaveText::SetPos ( Int_t  px,
Int_t  py 
)
virtual

Definition at line 86 of file BesPaveText.cxx.

87{
88 if (!gPad) {
89 cout << "BesPaveText::SetPos, gPad does not exist" << endl;
90 return;
91 }
92
93 Double_t x = gPad->AbsPixeltoX(px+10);
94 Double_t y = gPad->AbsPixeltoY(py-10);
95 Double_t x1, y1, x2, y2, xNDC, yNDC;
96 gPad->GetRange(x1, y1, x2, y2);
97 xNDC = (x-x1)/(x2-x1);
98 yNDC = (y-y1)/(y2-y1);
99 //cout << xNDC << " " << yNDC << endl;
100
101 x1 = xNDC;
102 y1 = yNDC;
103 x2 = xNDC + fdxNDC;
104 y2 = yNDC + fdyNDC;
105
106 Double_t delta = 0.02;
107 if (x2 > 1.0 && y2 > 1.0) {
108 x1 -= (fdxNDC+delta);
109 x2 -= (fdxNDC+delta);
110 y1 -= (fdyNDC+delta);
111 y2 -= (fdyNDC+delta);
112 }
113 else if (x2 > 1.0) {
114 x1 -= fdxNDC;
115 x2 -= fdxNDC;
116 }
117 if (y2 > 1.0) {
118 y1 -= fdyNDC;
119 y2 -= fdyNDC;
120 }
121
122 SetX1NDC(x1);
123 SetY1NDC(y1);
124 SetX2NDC(x2);
125 SetY2NDC(y2);
126 ConvertNDCtoPad();
127}
Double_t x[10]

Referenced by BesGeoTrack::ExecuteEvent(), Emc2DCrystal::ExecuteEvent(), Mdc2DWire::ExecuteEvent(), Muc2DStrip::ExecuteEvent(), and Tof2DScin::ExecuteEvent().

◆ SetPos() [2/2]

virtual void BesPaveText::SetPos ( Int_t  px,
Int_t  py 
)
virtual

◆ SetText() [1/2]

virtual void BesPaveText::SetText ( std::vector< TString >  infoCon)
virtual

◆ SetText() [2/2]

virtual void BesPaveText::SetText ( std::vector< TString >  infoCon)
virtual

Member Data Documentation

◆ fdxNDC

Double_t BesPaveText::fdxNDC
protected

◆ fdyNDC

Double_t BesPaveText::fdyNDC
protected

◆ fTextSize

Double_t BesPaveText::fTextSize
protected

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