|
ROOT 6.12/07 Reference Guide |
Public Member Functions | |
| TCanvas ()=default | |
| Create a temporary TCanvas; for long-lived ones please use Create(). More... | |
| ~TCanvas () | |
| template<class PANEL > | |
| bool | AddPanel (std::shared_ptr< PANEL > &panel) |
| Insert panel into the canvas, canvas should be shown at this moment. More... | |
| const TCanvas & | GetCanvas () const override |
| Access to the top-most canvas, if any (const version). More... | |
| TCanvas & | GetCanvas () override |
| Access to the top-most canvas, if any (non-const version). More... | |
| const std::array< TPadCoord::Pixel, 2 > & | GetSize () const |
| Return canvas pixel size as array with two elements - width and height. More... | |
| const std::string & | GetTitle () const |
| Get the canvas's title. More... | |
| void | Hide () |
| Close all canvas displays. More... | |
| bool | IsModified () const |
| void | Modified () |
| std::array< TPadCoord::Normal, 2 > | PixelsToNormal (const std::array< TPadCoord::Pixel, 2 > &pos) const final |
Convert a Pixel position to Canvas-normalized positions. More... | |
| void | SaveAs (const std::string &filename, bool async=false, CanvasCallback_t callback=nullptr) |
| Save canvas in image file. More... | |
| void | SetSize (const std::array< TPadCoord::Pixel, 2 > &sz) |
| Set canvas pixel size as array with two elements - width and height. More... | |
| void | SetSize (const TPadCoord::Pixel &width, const TPadCoord::Pixel &height) |
| Set canvas pixel size - width and height. More... | |
| void | SetTitle (const std::string &title) |
| Set the canvas's title. More... | |
| void | Show (const std::string &where="") |
| Display the canvas. More... | |
| void | Update (bool async=false, CanvasCallback_t callback=nullptr) |
| update drawing More... | |
Public Member Functions inherited from ROOT::Experimental::TPadBase | |
| virtual | ~TPadBase () |
| std::vector< std::vector< TPad * > > | Divide (int nHoriz, int nVert, const TPadExtent &padding={}) |
| Divide this pad into a grid of subpad with padding in between. More... | |
| template<class T > | |
| auto & | Draw (const std::shared_ptr< T > &what) |
| Add something to be painted. More... | |
| template<class T > | |
| auto & | Draw (std::unique_ptr< T > &&what) |
| Add something to be painted. The pad claims ownership. More... | |
| template<class T , class = typename std::enable_if<!ROOT::TypeTraits::IsSmartOrDumbPtr<T>::value>::type> | |
| auto & | Draw (const T &what) |
| Add a copy of something to be painted. More... | |
| const Primitives_t & | GetPrimitives () const |
| Get the elements contained in the canvas. More... | |
| std::array< TPadCoord::Normal, 2 > | UserToNormal (const std::array< TPadCoord::User, 2 > &pos) const |
| Convert user coordinates to normal coordinates. More... | |
| void | Wipe () |
| Remove an object from the list of primitives. More... | |
Static Public Member Functions | |
| static std::shared_ptr< TCanvas > | Create (const std::string &title) |
| static const std::vector< std::shared_ptr< TCanvas > > & | GetCanvases () |
Private Member Functions | |
| TCanvas (const TCanvas &)=delete | |
| Disable copy construction for now. More... | |
| TCanvas & | operator= (const TCanvas &)=delete |
| Disable assignment for now. More... | |
Private Attributes | |
| Internal::TDrawingAttrTable< TColor > | fColorTable |
| Colors used by drawing options in the pad and any sub-pad. More... | |
| Internal::TDrawingAttrTable< double > | fFPAttrTable |
| Floating points used by drawing options in the pad and any sub-pad. More... | |
| Internal::TDrawingAttrTable< long long > | fIntAttrTable |
| Integers used by drawing options in the pad and any sub-pad. More... | |
| uint64_t | fModified |
| Modify counter, incremented every time canvas is changed. More... | |
| std::unique_ptr< Internal::TVirtualCanvasPainter > | fPainter |
| The painter of this canvas, bootstrapping the graphics connection. More... | |
| std::array< TPadCoord::Pixel, 2 > | fSize |
| Size of the canvas in pixels,. More... | |
| std::string | fTitle |
| Title of the canvas. More... | |
Drawing options attribute handling | |
| class | ROOT::Experimental::TDrawingOptsBaseNoDefault |
| template<class PRIMITIVE > | |
| class | ROOT::Experimental::TDrawingAttrRef |
| Internal::TDrawingAttrTable< TColor > & | GetAttrTable (TColor *) |
| Attribute table (non-const access). More... | |
| Internal::TDrawingAttrTable< long long > & | GetAttrTable (long long *) |
| Internal::TDrawingAttrTable< double > & | GetAttrTable (double *) |
| const Internal::TDrawingAttrTable< TColor > & | GetAttrTable (TColor *) const |
| Attribute table (const access). More... | |
| const Internal::TDrawingAttrTable< long long > & | GetAttrTable (long long *) const |
| const Internal::TDrawingAttrTable< double > & | GetAttrTable (double *) const |
Additional Inherited Members | |
Public Types inherited from ROOT::Experimental::TPadBase | |
| using | Primitives_t = std::vector< std::unique_ptr< TDrawable > > |
Protected Member Functions inherited from ROOT::Experimental::TPadBase | |
| TPadBase ()=default | |
| Allow derived classes to default construct a TPadBase. More... | |
#include <ROOT/TCanvas.hxx>
|
privatedelete |
Disable copy construction for now.
|
default |
|
inline |
Definition at line 94 of file TCanvas.hxx.
|
inline |
Insert panel into the canvas, canvas should be shown at this moment.
Definition at line 122 of file TCanvas.hxx.
|
static |
Definition at line 63 of file TCanvas.cxx.
|
inlineprivate |
Attribute table (non-const access).
Definition at line 74 of file TCanvas.hxx.
|
inlineprivate |
Definition at line 75 of file TCanvas.hxx.
|
inlineprivate |
Definition at line 76 of file TCanvas.hxx.
|
inlineprivate |
Attribute table (const access).
Definition at line 79 of file TCanvas.hxx.
|
inlineprivate |
Definition at line 80 of file TCanvas.hxx.
|
inlineprivate |
Definition at line 81 of file TCanvas.hxx.
|
inlineoverridevirtual |
Access to the top-most canvas, if any (const version).
Implements ROOT::Experimental::TPadBase.
Definition at line 96 of file TCanvas.hxx.
|
inlineoverridevirtual |
Access to the top-most canvas, if any (non-const version).
Implements ROOT::Experimental::TPadBase.
Definition at line 99 of file TCanvas.hxx.
|
static |
Definition at line 35 of file TCanvas.cxx.
|
inline |
Return canvas pixel size as array with two elements - width and height.
Definition at line 102 of file TCanvas.hxx.
|
inline |
Get the canvas's title.
Definition at line 140 of file TCanvas.hxx.
| void TCanvas::Hide | ( | ) |
Close all canvas displays.
Definition at line 107 of file TCanvas.cxx.
| bool TCanvas::IsModified | ( | ) | const |
Definition at line 46 of file TCanvas.cxx.
|
inline |
Definition at line 128 of file TCanvas.hxx.
Disable assignment for now.
|
inlinefinalvirtual |
Convert a Pixel position to Canvas-normalized positions.
Implements ROOT::Experimental::TPadBase.
Definition at line 146 of file TCanvas.hxx.
| void TCanvas::SaveAs | ( | const std::string & | filename, |
| bool | async = false, |
||
| CanvasCallback_t | callback = nullptr |
||
| ) |
Save canvas in image file.
Definition at line 113 of file TCanvas.cxx.
|
inline |
Set canvas pixel size as array with two elements - width and height.
Definition at line 105 of file TCanvas.hxx.
|
inline |
Set canvas pixel size - width and height.
Definition at line 108 of file TCanvas.hxx.
|
inline |
Set the canvas's title.
Definition at line 143 of file TCanvas.hxx.
| void TCanvas::Show | ( | const std::string & | where = "" | ) |
Display the canvas.
Create new display for the canvas Parameter.
cef - Chromium Embeded Framework, local display, local communication qt5 - Qt5 WebEngine (when running via rootqt5), local display, local communicationbrowser - default system web-browser, communication via random http port from range 8800 - 9800 <prog> - any program name which will be started instead of default browser, like firefox or /usr/bin/opera one could also specify $url in program name, which will be replaced with canvas URL native - either any available local display or default browser
Canvas can be displayed in several different places
Definition at line 85 of file TCanvas.cxx.
| void TCanvas::Update | ( | bool | async = false, |
| CanvasCallback_t | callback = nullptr |
||
| ) |
update drawing
Definition at line 51 of file TCanvas.cxx.
|
friend |
Definition at line 85 of file TCanvas.hxx.
|
friend |
Definition at line 83 of file TCanvas.hxx.
|
private |
Colors used by drawing options in the pad and any sub-pad.
Definition at line 48 of file TCanvas.hxx.
|
private |
Floating points used by drawing options in the pad and any sub-pad.
Definition at line 54 of file TCanvas.hxx.
|
private |
Integers used by drawing options in the pad and any sub-pad.
Definition at line 51 of file TCanvas.hxx.
|
private |
Modify counter, incremented every time canvas is changed.
!
Definition at line 57 of file TCanvas.hxx.
|
private |
The painter of this canvas, bootstrapping the graphics connection.
Unmapped canvases (those that never had Draw() invoked) might not have a painter. !
Definition at line 62 of file TCanvas.hxx.
|
private |
Size of the canvas in pixels,.
Definition at line 45 of file TCanvas.hxx.
|
private |
Title of the canvas.
Definition at line 42 of file TCanvas.hxx.