Skip to content

[draft] [DO NOT MERGE] Introducing TObject::PaintOn() method #15937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/base/inc/TObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class TBuffer;
class TObjArray;
class TMethod;
class TTimer;
class TVirtualPad;

namespace ROOT {
namespace Internal {
Expand Down Expand Up @@ -155,6 +156,7 @@ class TObject {
virtual Bool_t Notify();
virtual void ls(Option_t *option="") const;
virtual void Paint(Option_t *option="");
virtual void PaintOn(TVirtualPad *pad, Option_t *option="");
virtual void Pop();
virtual void Print(Option_t *option="") const;
virtual Int_t Read(const char *name);
Expand Down
16 changes: 14 additions & 2 deletions core/base/src/TObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,21 @@ Bool_t TObject::Notify()
/// redrawn). While paint just draws the object without adding it to
/// the pad display list.

void TObject::Paint(Option_t *)
void TObject::Paint(Option_t *opt)
{
if (gPad)
PaintOn(gPad, opt);
}

////////////////////////////////////////////////////////////////////////////////
/// This is new method for object painting.
/// It provides pad where object should be painted as first argument
/// One should provide implementation in derived classes.
/// To add object to the pad or canvas, one should use TPad::Add() method.
/// For backward compatibility old Paint() method is invoked when it still exists in derived class

void TObject::PaintOn(TVirtualPad *, Option_t *)
{
// AbstractMethod("Paint");
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion graf2d/asimage/inc/TASPaletteEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TASPaletteEditor : public TPaletteEditor, public TGMainFrame {
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
public:
LimitLine(Coord_t x, Coord_t y1, Coord_t y2, TASPaletteEditor *gui);
void Paint(Option_t *option = "") override;
void PaintOn(TVirtualPad *pad, Option_t *option = "") override;
};

Double_t fMinValue; ///< min value of image
Expand Down
8 changes: 4 additions & 4 deletions graf2d/asimage/src/TASPaletteEditor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,12 @@ TASPaletteEditor::LimitLine::LimitLine(Coord_t x, Coord_t y1, Coord_t y2,
////////////////////////////////////////////////////////////////////////////////
/// Paint the limit lines.

void TASPaletteEditor::LimitLine::Paint(Option_t *option)
void TASPaletteEditor::LimitLine::PaintOn(TVirtualPad *pad, Option_t *option)
{
fY1 = gPad->GetUymin();
fY2 = gPad->GetUymax();
fY1 = pad->GetUymin();
fY2 = pad->GetUymax();

TLine::Paint(option);
TLine::PaintOn(pad, option);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
61 changes: 59 additions & 2 deletions graf2d/gpad/src/TPad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3578,6 +3578,55 @@
return y;
}

/////////////////////////////////////////////////////////////
/// Returns true if custom Paint exists (or can exists) in the object
/// Use direct check with GCC
/// For other compilers try to guess via dictionary
/// Only classes with dictionary and Paint defined only in TObject will allow to use PaintOn

bool isCustomPaint(TObject *obj)
{
if (!obj)
return false;

#if defined(__GNUC__)

// direct check of virtual method pointer, works only with GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"

Check warning on line 3596 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac-beta ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

unknown warning group '-Wpmf-conversions', ignored [-Wunknown-warning-option]

Check warning on line 3596 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac14 ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

unknown warning group '-Wpmf-conversions', ignored [-Wunknown-warning-option]

Check warning on line 3596 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac13 ARM64 LLVM_ENABLE_ASSERTIONS=On, builtin_zlib=ON

unknown warning group '-Wpmf-conversions', ignored [-Wunknown-warning-option]

Check warning on line 3596 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

unknown warning group '-Wpmf-conversions', ignored [-Wunknown-warning-option]
return ((void *) (obj->*(&TObject::Paint)) != (void *) (&TObject::Paint));

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac-beta ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

reference to non-static member function must be called

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac-beta ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

cannot cast from type 'void (TObject::*)(Option_t *)' to pointer type 'void *'

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac14 ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

reference to non-static member function must be called

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac14 ARM64 LLVM_ENABLE_ASSERTIONS=On, CMAKE_CXX_STANDARD=20

cannot cast from type 'void (TObject::*)(Option_t *)' to pointer type 'void *'

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac13 ARM64 LLVM_ENABLE_ASSERTIONS=On, builtin_zlib=ON

reference to non-static member function must be called

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / mac13 ARM64 LLVM_ENABLE_ASSERTIONS=On, builtin_zlib=ON

cannot cast from type 'void (TObject::*)(Option_t *)' to pointer type 'void *'

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

reference to non-static member function must be called

Check failure on line 3597 in graf2d/gpad/src/TPad.cxx

View workflow job for this annotation

GitHub Actions / alma9-clang clang LLVM_ENABLE_ASSERTIONS=On, CMAKE_C_COMPILER=clang, CMAKE_CXX_COMPILER=clang++

cannot cast from type 'void (TObject::*)(Option_t *)' to pointer type 'void *'
#pragma GCC diagnostic pop

#else
static std::map<const std::type_info*, bool> sMap;

const std::type_info &info = typeid(*obj);

auto iter = sMap.find(&info);
if (iter != sMap.end())
return iter->second;

auto cl = obj->IsA();

bool res = false;

if (cl->GetTypeInfo() != &info) {
// type_info does not match with class - dictionary not provided
// We have to suppose custom Paint() and have to call it
res = true;
} else {
auto m = cl->GetMethodAllAny("Paint");
// only classes with TObject::Paint will allow to use PaintOn
res = !m || (m->GetClass() != TObject::Class());
}

sMap[&info] = res;
if (gDebug > 0)
::Info("isCustomPaint", "Use %s:%s for painting", info.name(), res ? "Paint()" : "PaintOn");
return res;
#endif
}

////////////////////////////////////////////////////////////////////////////////
/// Paint all primitives in pad.

Expand Down Expand Up @@ -3622,7 +3671,11 @@
began3DScene = kTRUE;
}

obj->Paint(lnk->GetOption());
// if custom Paint method exists in the object - it will be invoked
if (isCustomPaint(obj))
obj->Paint(lnk->GetOption());
else
obj->PaintOn(this, lnk->GetOption());
lnk = lnk->Next();
}
}
Expand Down Expand Up @@ -3869,7 +3922,11 @@
began3DScene = kTRUE;
}

obj->Paint(lnk->GetOption());
// if custom Paint method exists in the object - it will be invoked
if (isCustomPaint(obj))
obj->Paint(lnk->GetOption());
else
obj->PaintOn(this, lnk->GetOption());
}
lnk = lnk->Next();
}
Expand Down
16 changes: 11 additions & 5 deletions graf2d/graf/inc/TArrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ class TArrow : public TLine, public TAttFill {
Float_t GetAngle() const {return fAngle;}
Float_t GetArrowSize() const {return fArrowSize;}
Option_t *GetOption() const override { return fOption.Data();}
void Paint(Option_t *option="") override;
virtual void PaintArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
,Float_t arrowsize=0.05 ,Option_t *option=">");
virtual void PaintArrowNDC(Double_t u1, Double_t v1,Double_t u2 ,Double_t v2
,Float_t arrowsize=0.05 ,Option_t *option=">");
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Float_t arrowsize=0.05 ,Option_t *option=">");
virtual void PaintArrowOn(TVirtualPad *pad,
Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Float_t arrowsize=0.05 ,Option_t *option=">");
virtual void PaintArrowNDC(Double_t u1, Double_t v1,Double_t u2 ,Double_t v2,
Float_t arrowsize=0.05 ,Option_t *option=">");
virtual void PaintArrowNDCOn(TVirtualPad *pad,
Double_t u1, Double_t v1,Double_t u2 ,Double_t v2,
Float_t arrowsize=0.05 ,Option_t *option=">");
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetAngle(Float_t angle=60) {fAngle=angle;} // *MENU*
virtual void SetArrowSize(Float_t arrowsize=0.05) {fArrowSize=arrowsize;} // *MENU*
Expand Down
3 changes: 2 additions & 1 deletion graf2d/graf/inc/TBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class TBox : public TObject, public TAttLine, public TAttFill, public TAttBBox2D
virtual void HideToolTip(Int_t event);
virtual Int_t IsInside(Double_t x, Double_t y) const;
void ls(Option_t *option="") const override;
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
virtual void PaintBoxOn(TVirtualPad *pad, Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
void Print(Option_t *option="") const override;
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetX1(Double_t x1) {fX1=x1;}
Expand Down
5 changes: 4 additions & 1 deletion graf2d/graf/inc/TGaxis.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ class TGaxis : public TLine, public TAttText {
Float_t GetTickSize() const {return fTickSize;}
virtual void ImportAxisAttributes(TAxis *axis);
void LabelsLimits(const char *label, Int_t &first, Int_t &last);
void Paint(Option_t *chopt="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintAxis(Double_t xmin,Double_t ymin,Double_t xmax,Double_t ymax,
Double_t &wmin,Double_t &wmax,Int_t &ndiv, Option_t *chopt="",
Double_t gridlength = 0, Bool_t drawGridOnly = kFALSE);
virtual void PaintAxisOn(TVirtualPad *pad, Double_t xmin,Double_t ymin,Double_t xmax,Double_t ymax,
Double_t &wmin,Double_t &wmax,Int_t &ndiv, Option_t *chopt="",
Double_t gridlength = 0, Bool_t drawGridOnly = kFALSE);
virtual void Rotate(Double_t X, Double_t Y, Double_t CFI, Double_t SFI
,Double_t XT, Double_t YT, Double_t &U, Double_t &V);
void ResetLabelAttributes(TLatex* t);
Expand Down
24 changes: 15 additions & 9 deletions graf2d/graf/inc/TLatex.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,22 @@ class TLatex : public TText, public TAttLine {
TLatex& operator=(const TLatex&);

//Text analysis and painting
TLatexFormSize Analyse(Double_t x, Double_t y, const TextSpec_t &spec, const Char_t *t,Int_t length);
TLatexFormSize Anal1(const TextSpec_t &spec, const Char_t *t,Int_t length);
TLatexFormSize Analyse(TVirtualPad *pad, Double_t x, Double_t y, const TextSpec_t &spec, const Char_t *t,Int_t length);
TLatexFormSize Anal1(TVirtualPad *pad, const TextSpec_t &spec, const Char_t *t,Int_t length);

void DrawPolyLine(Int_t npoints, Double_t *xx, Double_t *yy, const TextSpec_t &spec, Double_t scale_width = 0.);
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, const TextSpec_t &spec);
void DrawCircle(Double_t x1, Double_t y1, Double_t r, const TextSpec_t &spec);
void DrawParenthesis(Double_t x1, Double_t y1, Double_t r1, Double_t r2, Double_t phimin, Double_t phimax, const TextSpec_t &spec);
void DrawPolyLine(TVirtualPad *pad, Int_t npoints, Double_t *xx, Double_t *yy, const TextSpec_t &spec, Double_t scale_width = 0.);
void DrawLine(TVirtualPad *pad, Double_t x1, Double_t y1, Double_t x2, Double_t y2, const TextSpec_t &spec);
void DrawCircle(TVirtualPad *pad, Double_t x1, Double_t y1, Double_t r, const TextSpec_t &spec);
void DrawParenthesis(TVirtualPad *pad, Double_t x1, Double_t y1, Double_t r1, Double_t r2, Double_t phimin, Double_t phimax, const TextSpec_t &spec);

TLatexFormSize FirstParse(Double_t angle, Double_t size, const Char_t *text);
TLatexFormSize FirstParse(TVirtualPad *pad, Double_t angle, Double_t size, const Char_t *text);

Int_t PaintLatex1(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
Int_t PaintLatex1(TVirtualPad *pad, Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);

Double_t GetHeightOf(TVirtualPad *pad) const;
Double_t GetXsizeOn(TVirtualPad *pad);
Double_t GetYsizeOn(TVirtualPad *pad);
void GetBoundingBoxOn(TVirtualPad *pad, UInt_t &w, UInt_t &h, Bool_t angle = kFALSE);

void Savefs(TLatexFormSize *fs);
TLatexFormSize Readfs();
Expand All @@ -108,8 +113,9 @@ class TLatex : public TText, public TAttLine {
Double_t GetXsize();
Double_t GetYsize();
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle = kFALSE) override;
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
virtual void PaintLatexOn(TVirtualPad *pad, Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);

void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetIndiceSize(Double_t factorSize);
Expand Down
5 changes: 3 additions & 2 deletions graf2d/graf/inc/TLegend.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ class TLegend : public TPave , public TAttText {
Int_t GetNRows() const;
virtual void InsertEntry( const char* objectName = "",const char* label = "",
Option_t* option = "lpf" ); // *MENU*
void Paint( Option_t* option = "" ) override;
void PaintOn(TVirtualPad *pad, Option_t *option = "") override;
virtual void PaintPrimitives();
void Print( Option_t* option = "" ) const override;
virtual void PaintPrimitivesOn(TVirtualPad *pad);
void Print(Option_t* option = "") const override;
void RecursiveRemove(TObject *obj) override;
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
void SetDefaults() { fEntrySeparation = 0.1f; fMargin = 0.25f; fNColumns = 1; fColumnSeparation = 0.0f; }
Expand Down
8 changes: 5 additions & 3 deletions graf2d/graf/inc/TLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ class TLine : public TObject, public TAttLine, public TAttBBox2D {
Bool_t IsHorizontal();
Bool_t IsVertical();
void ls(Option_t *option="") const override;
void Paint(Option_t *option="") override;
virtual void PaintLine(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
virtual void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t v2);
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintLine(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
virtual void PaintLineOn(TVirtualPad *pad, Double_t x1, Double_t y1,Double_t x2, Double_t y2);
virtual void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double_t v2);
virtual void PaintLineNDCOn(TVirtualPad *pad, Double_t u1, Double_t v1,Double_t u2, Double_t v2);
void Print(Option_t *option="") const override;
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetNDC(Bool_t isNDC=kTRUE);
Expand Down
12 changes: 8 additions & 4 deletions graf2d/graf/inc/TMathText.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ class TMathText : public TText, public TAttFill {
TMathTextRenderer *fRenderer{nullptr}; //!TMathText Painter
TMathText &operator=(const TMathText &);

void Render(const Double_t x, const Double_t y,
void Render(TVirtualPad *pad,
const Double_t x, const Double_t y,
const Double_t size, const Double_t angle,
const Char_t *t, const Int_t length);
void GetSize(Double_t &x0, Double_t &y0,
void GetSize(TVirtualPad *pad,
Double_t &x0, Double_t &y0,
Double_t &x1, Double_t &y1,
const Double_t size, const Double_t angle,
const Char_t *t, const Int_t length);
void GetAlignPoint(Double_t &x0, Double_t &y0,
void GetAlignPoint(TVirtualPad *pad,
Double_t &x0, Double_t &y0,
const Double_t size, const Double_t angle,
const Char_t *t, const Int_t length,
const Short_t align);
Expand All @@ -48,8 +51,9 @@ class TMathText : public TText, public TAttFill {
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle = kFALSE) override;
Double_t GetXsize();
Double_t GetYsize();
void Paint(Option_t *option = "") override;
void PaintOn(TVirtualPad *pad, Option_t *option = "") override;
virtual void PaintMathText(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
virtual void PaintMathTextOn(TVirtualPad *pad, Double_t x, Double_t y, Double_t angle, Double_t size, const char *text);
void SavePrimitive(std::ostream &out, Option_t *option = "") override;

ClassDefOverride(TMathText,2) //TeX mathematical formula
Expand Down
11 changes: 8 additions & 3 deletions graf2d/graf/inc/TPave.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class TPave : public TBox {

void Copy(TObject &pave) const override;
virtual void ConvertNDCtoPad();
virtual void ConvertNDCto(TVirtualPad *pad);
Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
void Draw(Option_t *option="") override;
virtual TPave *DrawPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Expand All @@ -63,11 +64,15 @@ class TPave : public TBox {
ULong_t Hash() const override { return fName.Hash(); }
Bool_t IsSortable() const override { return kTRUE; }
void ls(Option_t *option="") const override;
void Paint(Option_t *option="") override;
virtual void PaintPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Int_t bordersize=4 ,Option_t *option="br");
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintPave(Double_t x1, Double_t y1, Double_t x2 ,Double_t y2,
Int_t bordersize=4, Option_t *option="br");
virtual void PaintPaveOn(TVirtualPad *pad, Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Int_t bordersize ,Option_t *option);
virtual void PaintPaveArc(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Int_t bordersize=4 ,Option_t *option="br");
virtual void PaintPaveArcOn(TVirtualPad *pad, Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
Int_t bordersize, Option_t *option);
void Print(Option_t *option="") const override;
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
/**
Expand Down
4 changes: 3 additions & 1 deletion graf2d/graf/inc/TPaveLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ class TPaveLabel : public TPave, public TAttText {
const char *label, Option_t *option="");
const char *GetLabel() const {return fLabel.Data();}
const char *GetTitle() const override {return fLabel.Data();}
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
const char *label, Option_t *option="");
virtual void PaintPaveLabelOn(TVirtualPad *pad, Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
const char *label, Option_t *option="");
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetLabel(const char *label) {fLabel = label;} // *MENU*

Expand Down
2 changes: 1 addition & 1 deletion graf2d/graf/inc/TPaveStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TPaveStats : public TPaveText, public TVirtualPaveStats {
Int_t GetOptFit() const;
Int_t GetOptStat() const;
TObject *GetParent() const override { return fParent; }
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
void InsertText(const char *) override { }
void InsertLine() override { }
void ReadFile(const char *, Option_t *, Int_t, Int_t) override {}
Expand Down
3 changes: 2 additions & 1 deletion graf2d/graf/inc/TPaveText.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ class TPaveText : public TPave, public TAttText {
virtual Int_t GetSize() const;
virtual void InsertLine(); // *MENU*
virtual void InsertText(const char *label); // *MENU*
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
virtual void PaintPrimitives(Int_t mode);
virtual void PaintPrimitivesOn(TVirtualPad *pad, Int_t mode);
void Print(Option_t *option="") const override;
virtual void ReadFile(const char *filename, Option_t *option="", Int_t nlines=50, Int_t fromline=0); // *MENU*
virtual void SaveLines(std::ostream &out, const char *name, Bool_t saved);
Expand Down
2 changes: 1 addition & 1 deletion graf2d/graf/inc/TPavesText.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TPavesText : public TPaveText {

void Draw(Option_t *option="") override;
virtual Int_t GetNpaves() {return fNpaves;}
void Paint(Option_t *option="") override;
void PaintOn(TVirtualPad *pad, Option_t *option="") override;
void SavePrimitive(std::ostream &out, Option_t *option = "") override;
virtual void SetNpaves(Int_t npaves=5) {fNpaves=npaves;} // *MENU*

Expand Down
Loading
Loading