Logo ROOT   6.12/07
Reference Guide
TFrame.cxx
Go to the documentation of this file.
1 /// \file TFrame.cxx
2 /// \ingroup Gpad ROOT7
3 /// \author Axel Naumann <axel@cern.ch>
4 /// \date 2017-09-26
5 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6 /// is welcome!
7 
8 /*************************************************************************
9  * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
10  * All rights reserved. *
11  * *
12  * For the licensing terms see $ROOTSYS/LICENSE. *
13  * For the list of contributors see $ROOTSYS/README/CREDITS. *
14  *************************************************************************/
15 
16 #include "ROOT/TFrame.hxx"
17 
18 #include "ROOT/TLogger.hxx"
20 
21 #include <cassert>
22 
23 namespace {
24 using namespace ROOT::Experimental;
25 // FIXME: Replace by array of TFrameAxis!
26 class TPadUserCoordDefault: public Detail::TPadUserCoordBase {
27 
28 public:
29  std::array<TPadCoord::Normal, 2> ToNormal(const std::array<TPadCoord::User, 2> &user) const override
30  {
31  R__ERROR_HERE("Gpad") << "Not yet implemented!";
32  return {{user[0].fVal, user[1].fVal}};
33  }
34 };
35 } // namespace
36 
37 ROOT::Experimental::TFrame::TFrame(std::unique_ptr<Detail::TPadUserCoordBase> &&coords, const TPadPos &pos,
38  const TPadExtent &size)
39  : fUserCoord(std::move(coords)), fPalette(TPalette::GetPalette("default")), fPos(pos), fSize(size)
40 {
41  if (!fUserCoord)
42  fUserCoord.reset(new TPadUserCoordDefault);
43 }
STL namespace.
A position (horizontal and vertical) in a TPad.
Definition: TPadPos.hxx:27
TFrame(std::unique_ptr< Detail::TPadUserCoordBase > &&coords, const TPadPos &pos=DrawingOpts::Default().fPos, const TPadExtent &size=DrawingOpts::Default().fSize)
Constructor taking user coordinate system, position and extent.
A set of colors.
Definition: TPalette.hxx:38
An extent / size (horizontal and vertical) in a TPad.
Definition: TPadExtent.hxx:44
#define R__ERROR_HERE(GROUP)
Definition: TLogger.hxx:126