Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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/RPad.hxx"
21#include "ROOT/RLine.hxx"
22
23void pad()
24{
25 using namespace ROOT::Experimental;
26
27 auto canvas = RCanvas::Create("what to do with a pad!");
28 auto pads = canvas->Divide(3, 3);
29
30 for (int i = 0; i < 3; ++i)
31 for (int j = 0; j < 3; ++j) {
32 pads[i][j]->Draw<RLine>()->SetP1({0.1_normal, 0.1_normal}).SetP2({0.9_normal, 0.9_normal});
33 pads[i][j]->Draw<RLine>()->SetP1({0.1_normal, 0.9_normal}).SetP2({0.9_normal, 0.1_normal});
34 }
35
36 canvas->Show();
37}