232 fOptFit =
gStyle->GetOptFit();
233 fOptStat =
gStyle->GetOptStat();
243 fOptFit =
gStyle->GetOptFit();
244 fOptStat =
gStyle->GetOptStat();
245 SetFitFormat(
gStyle->GetFitFormat());
246 SetStatFormat(
gStyle->GetStatFormat());
361 if (nlines == 0) nlines = 5;
371 Double_t longest = 0, titlelength = 0;
373 char *st, *sl =
nullptr;
375 textsize = 0.92*yspace/(y2 - y1);
376 titlesize = textsize;
377 wtok[0] = wtok[1] = 0;
380 TLatex *latex = (TLatex*)
line;
382 sl =
new char[nchs+1];
383 strlcpy(sl, latex->
GetTitle(),nchs+1);
384 if (strpbrk(sl,
"=") && print_name == 0) {
385 st = strtok(sl,
"=");
387 while (st && (itok < 2)) {
388 TLatex latex_tok(0., 0., st);
391 latex_tok.SetTextFont(tfont);
392 latex_tok.SetTextSize(textsize);
393 w = latex_tok.GetXsize();
394 if (w > wtok[itok]) wtok[itok] = w;
395 st = strtok(
nullptr,
"=");
398 }
else if (strpbrk(sl,
"|")) {
404 titlelength = latex->
GetXsize()+2.*margin;
405 if (titlelength > 0.98*dx) titlesize *= 0.98*dx/titlelength;
408 delete [] sl; sl =
nullptr;
411 longest = wtok[0]+wtok[1]+2.*margin;
412 if (longest > 0.98*dx) textsize *= 0.98*dx/longest;
415 titlesize = textsize;
417 Double_t ytext = y2ref + 0.5*yspace;
426 TLatex *latex = (TLatex*)
line;
439 sl =
new char[nchs+1];
440 strlcpy(sl, latex->
GetTitle(), nchs+1);
442 if (strpbrk(sl,
"=") && print_name == 0) {
443 st = strtok(sl,
"=");
448 if (halign == 12) xtext = x1ref + margin;
450 xtext = x2ref - margin;
451 typolabel = typolabel.
Strip();
457 st = strtok(
nullptr,
"=");
461 }
else if (strpbrk(sl,
"|")) {
466 Double_t xx[6] = { x1ref, x2ref, xline1, xline1, xline2, xline2 };
467 Double_t yy[6] = { yline1, yline1, yline1, yline2, yline1, yline2 };
468 gPad->PaintSegments(3, xx, yy);
469 st = strtok(sl,
"|");
473 if (theIndex == 0) xtext = 0.5*(x1ref+xline1);
474 if (theIndex == 1) xtext = 0.5*(x1ref+x2ref);
475 if (theIndex == 2) xtext = 0.5*(xline2+x2ref);
482 st = strtok(
nullptr,
"|");
488 xtext = 0.5*(x1ref+x2ref);
493 gPad->PaintLine(x1ref,y2ref-yspace,x2ref,y2ref-yspace);
508 if (
fLabel.Length() > 0) {
511 x1 = x1ref + 0.25*dx;
512 x2 = x2ref - 0.25*dx;
513 y1 = y2ref - 0.02*dy;
514 y2 = y2ref + 0.02*dy;
530 if (strcmp(
GetName(),
"TPave"))
531 out <<
" ptstats->SetName(\"" <<
GetName() <<
"\");\n";
533 out <<
" ptstats->SetBorderSize(" <<
fBorderSize <<
");\n";
539 out <<
" ptstats->SetOptStat(" <<
GetOptStat() <<
");\n";
540 out <<
" ptstats->SetOptFit(" <<
GetOptFit() <<
");\n";
581 if (
gStyle->IsReading()) {
int Int_t
Signed integer 4 bytes (int).
float Size_t
Attribute size (float).
short Version_t
Class version identifier (short).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
short Style_t
Style number (short).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Short_t GetTextAlign() const
Return the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
virtual Color_t GetTextColor() const
Return the text color.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
Double_t fX1
X of 1st point.
Double_t fY2
Y of 2nd point.
Double_t fX2
X of 2nd point.
Double_t fY1
Y of 1st point.
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t GetVersionOwner() const =0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
TClass * IsA() const override
const char * GetTitle() const override
Returns title of object.
Bool_t TestBit(UInt_t f) const
virtual Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
TObject()
TObject constructor.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
@ kInvalidObject
if object ctor succeeded but object should not be used
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
void UseCurrentStyle() override
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
void SetOptStat(Int_t stat=1)
Int_t fOptStat
option Stat
TString fFitFormat
Printing format for fit parameters.
virtual void SetStatFormat(const char *format="6.4g")
void SetDrawOption(Option_t *option="") override
Set drawing option for object.
virtual const char * GetFitFormat() const
TClass * IsA() const override
TObject * fParent
owner of this TPaveStats
void SetOptFit(Int_t fit=1)
virtual const char * GetStatFormat() const
void Paint(Option_t *option="") override
Paint this pave with its current attributes.
void SetOption(Option_t *option="br") override
TString fStatFormat
Printing format for stats.
void Streamer(TBuffer &) override
Stream an object of class TPave.
virtual void SetFitFormat(const char *format="5.4g")
virtual Int_t GetSize() const
void Streamer(TBuffer &) override
Stream an object of class TPave.
TList * fLines
List of labels.
virtual void SaveLines(std::ostream &out, const char *name, Bool_t)
TString fLabel
Label written at the top of the pavetext.
Float_t fMargin
Text margin.
virtual void SetY1NDC(Double_t y1)
Double_t GetY2NDC() const
Int_t GetBorderSize() const
virtual void ConvertNDCtoPad()
Convert pave coordinates from NDC to Pad coordinates.
const char * GetName() const override
Returns name of object.
Double_t GetX2NDC() const
TString GetSavePaveArgs(const char *extra_arg=nullptr, Bool_t save_option=kTRUE)
Returns arguments which should be used when saving primitive constructor Check if coordinates are ini...
Int_t fBorderSize
window box bordersize in pixels
virtual void SetOption(Option_t *option="br")
Double_t GetY1NDC() const
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
virtual void SetY2NDC(Double_t y2)
Double_t GetX1NDC() const
virtual void PaintPave(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Int_t bordersize=4, Option_t *option="br")
Draw this pave with new coordinates.
virtual void SetX1NDC(Double_t x1)
virtual void SetX2NDC(Double_t x2)
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetY(Double_t y)
virtual void SetX(Double_t x)