Logo ROOT   6.18/05
Reference Guide
RPadPainter.cxx
Go to the documentation of this file.
1/// \file RPadPainter.cxx
2/// \ingroup Gpad ROOT7
3/// \author Sergey Linev
4/// \date 2018-03-12
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
9
11#include <ROOT/RPad.hxx>
12
13
14/// destructor
16{
17 // defined here, while TPadDisplayItem only included here
18}
19
20
21void ROOT::Experimental::Internal::RPadPainter::AddDisplayItem(std::unique_ptr<RDisplayItem> &&item)
22{
23 item->SetObjectID(fCurrentDrawableId);
24 fPadDisplayItem->Add(std::move(item));
25}
26
28{
29 fPadDisplayItem = std::make_unique<RPadDisplayItem>();
30
31 fPadDisplayItem->SetFrame(pad.GetFrame());
32
33 for (auto &&drawable : pad.GetPrimitives()) {
34
35 fCurrentDrawableId = drawable->GetId();
36
37 drawable->Paint(*this);
38 }
39
40}
void PaintDrawables(const RPadBase &pad)
Definition: RPadPainter.cxx:27
virtual ~RPadPainter()
Default destructor.
Definition: RPadPainter.cxx:15
virtual void AddDisplayItem(std::unique_ptr< RDisplayItem > &&item)
add display item to the canvas
Definition: RPadPainter.cxx:21
Base class for graphic containers for RDrawable-s.
Definition: RPad.hxx:41
const RFrame * GetFrame() const
Definition: RPad.hxx:138
const Primitives_t & GetPrimitives() const
Get the elements contained in the canvas.
Definition: RPad.hxx:158