17 #include "TVirtualPad.h" 23 fbIsLabStreamed(kTRUE)
29 TNamed(name, title ? title :
"Go4 LabelPainter"),
47 SetTextColor(GetLineColor());
61 Double_t xrange = (gPad->GetUxmax()-gPad->GetUxmin());
62 Double_t yrange = (gPad->GetUymax()-gPad->GetUymin());
74 if (!gPad->GetListOfPrimitives()->FindObject(
fxLabel))
80 Double_t x0 = xrange/2;
81 Double_t y0 = yrange/2;
92 fxLabel->SetLineColor(GetLineColor());
102 gROOT->GetListOfCanvases()->RecursiveRemove(
fxLabel);
106 if(option.Contains(
"reset")) {
129 if(!gPad)
return nullptr;
131 Double_t x0 = x, y0 = y, xmax = 0, ymax = 0;
135 TAttText::Copy(*label);
136 TAttLine::Copy(*label);
137 TAttFill::Copy(*label);
162 Double_t xpmin = gPad->GetUxmin();
163 Double_t xpmax = gPad->GetUxmax();
164 Double_t ypmin = gPad->GetUymin();
165 Double_t ypmax = gPad->GetUymax();
166 Double_t dx = (xpmax - xpmin);
167 Double_t dy = (ypmax - ypmin);
170 xmax = gPad->XtoPad(xmin) + width;
171 ymax = gPad->YtoPad(ymin) + height;
172 xmax = gPad->PadtoX(xmax);
173 ymax = gPad->PadtoY(ymax);
207 TPaveText::Paint(opt);
219 TPaveText::ExecuteEvent(event,px,py);
220 if(event == kButton1Up) {
static const void * fxLastDeleted
virtual void UnPaintLabel(Option_t *opt="")
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
TGo4Label * CreateCurrentLabel(Double_t x, Double_t y)
void Paint(Option_t *opt="") override
virtual ~TGo4LabelPainter()
virtual void PaintLabel(Option_t *opt="")
static const void * fxLastDeleted
void SetCaption(const char *txt)
void LabelCoords(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
void Paint(Option_t *opt="") override
void SetOwner(TObject *ob)
virtual void DisplayToFront(Option_t *opt="")
virtual void RePaintLabel(Option_t *opt="")