ROOT
Version v6.32
master
v6.36
v6.34
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
►
ROOT
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
rpad.cxx
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_rcanvas
3
///
4
/// This ROOT 7 example demonstrates how to create a ROOT 7 canvas (RCanvas) and
5
/// and divide it in 9 sub-pads.
6
///
7
/// \macro_image (rcanvas_js)
8
/// \macro_code
9
///
10
/// \date 2015-03-22
11
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
12
/// is welcome!
13
/// \author Axel Naumann <axel@cern.ch>
14
15
/*************************************************************************
16
* Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
17
* All rights reserved. *
18
* *
19
* For the licensing terms see $ROOTSYS/LICENSE. *
20
* For the list of contributors see $ROOTSYS/README/CREDITS. *
21
*************************************************************************/
22
23
#include "
ROOT/RCanvas.hxx
"
24
#include "
ROOT/RPad.hxx
"
25
#include "ROOT/RLine.hxx"
26
27
void
rpad
()
28
{
29
using namespace
ROOT::Experimental
;
30
31
auto
canvas = RCanvas::Create(
"RCanvas::Divide example"
);
32
auto
pads = canvas->Divide(3, 3);
33
34
for
(
int
i = 0; i < 3; ++i)
35
for
(
int
j
= 0;
j
< 3; ++
j
) {
36
pads[i][
j
]->Draw<
RLine
>()->
SetP1
({0.1
_normal
, 0.1
_normal
}).
SetP2
({0.9
_normal
, 0.9
_normal
});
37
pads[i][
j
]->Draw<
RLine
>()->
SetP1
({0.1
_normal
, 0.9
_normal
}).
SetP2
({0.9
_normal
, 0.1
_normal
});
38
}
39
40
canvas->Show();
41
}
RCanvas.hxx
RPad.hxx
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Experimental
Definition
RDirectory.hxx:30
tutorials
rcanvas
rpad.cxx
ROOT v6-32 - Reference Guide Generated on Thu Apr 24 2025 05:36:09 (GVA Time) using Doxygen 1.10.0