/************************************************************************* * Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #include "TLeafProvider.hxx" #include #include /** Provider for drawing of ROOT7 classes */ class TLeafDraw7Provider : public TLeafProvider { public: TLeafDraw7Provider() { RegisterDraw7(TLeaf::Class(), [](std::shared_ptr &subpad, std::unique_ptr &obj, const std::string &opt) -> bool { auto hist = TLeafProvider::DrawLeaf(obj); if (!hist) return false; if (subpad->NumPrimitives() > 0) { subpad->Wipe(); subpad->GetCanvas()->Modified(); subpad->GetCanvas()->Update(true); } std::shared_ptr shared; shared.reset(hist); subpad->Draw(shared, opt); return true; }); } } newTLeafDraw7Provider;