ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
text.cxx
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_v7
3
///
4
/// \macro_code
5
///
6
/// \date 2017-10-17
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 Olivier Couet <Olivier.Couet@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/RColor.hxx
"
21
#include "ROOT/RText.hxx"
22
#include "
ROOT/RPadPos.hxx
"
23
24
void
text()
25
{
26
using namespace
ROOT::Experimental;
27
28
// Create a canvas to be displayed.
29
auto
canvas = RCanvas::Create(
"Canvas Title"
);
30
31
for
(
int
i=0; i<=360; i+=10) {
32
auto
text = canvas->Draw<RText>(RPadPos(0.5_normal, 0.6_normal),
"____ Hello World"
);
33
34
RColor col((
int
) (0.38*i), (
int
) (0.64*i), (
int
) (0.76*i));
35
text->AttrText().SetColor(col).SetSize(10+i/10).SetAngle(i).SetAlign(13).SetFont(42);
36
}
37
38
canvas->Show();
39
}
RColor.hxx
RPadPos.hxx
RCanvas.hxx
tutorials
v7
text.cxx
Generated on Tue May 5 2020 14:03:52 for ROOT by
1.8.5