Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
pad.cxx
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_v7
3 ///
4 /// \macro_code
5 ///
6 /// \date 2015-03-22
7 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
8 /// is welcome!
9 /// \author Axel Naumann <axel@cern.ch>
10 
11 /*************************************************************************
12  * Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
13  * All rights reserved. *
14  * *
15  * For the licensing terms see $ROOTSYS/LICENSE. *
16  * For the list of contributors see $ROOTSYS/README/CREDITS. *
17  *************************************************************************/
18 
19 #include "ROOT/RCanvas.hxx"
20 #include "ROOT/RLine.hxx"
21 
22 void pad()
23 {
24  using namespace ROOT::Experimental;
25 
26  auto canvas = RCanvas::Create("what to do with a pad!");
27  auto pads = canvas->Divide(3, 3);
28 
29  for (int i = 0; i < 3; ++i)
30  for (int j = 0; j < 3; ++j) {
31  pads[i][j]->Draw<RLine>()->SetP1({0.1_normal, 0.1_normal}).SetP2({0.9_normal, 0.9_normal});
32  pads[i][j]->Draw<RLine>()->SetP1({0.1_normal, 0.9_normal}).SetP2({0.9_normal, 0.1_normal});
33  }
34 
35  canvas->Show();
36 }