ROOT
Version v6.34
master
v6.32
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
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
▼
core
▼
base
▼
doc
▼
macros
►
fillpatterns.C
►
fonts.C
►
textalign.C
►
textangle.C
►
inc
►
src
►
v7
►
clingutils
►
cont
►
dictgen
►
foundation
►
gui
►
imt
►
macosx
►
meta
►
metacling
►
multiproc
►
rint
►
testsupport
►
thread
►
unix
►
winnt
►
zip
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
v6-34-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
textalign.C
Go to the documentation of this file.
1
{
2
auto
*
Ta
=
new
TCanvas
(
"Ta"
,
"Ta"
,0,0,500,200);
3
Ta
->Range(0,0,1,1);
4
5
TLine
lv
;
6
lv
.
SetLineStyle
(3);
7
lv
.
SetLineColor
(
kBlue
);
8
lv
.
DrawLine
(0.33,0.0,0.33,1.0);
9
lv
.
DrawLine
(0.6,0.165,1.,0.165);
10
lv
.
DrawLine
(0.6,0.493,1.,0.493);
11
lv
.
DrawLine
(0.6,0.823,1.,0.823);
12
13
// Horizontal alignment.
14
auto
*
th1
=
new
TText
(0.33,0.165,
"Left adjusted"
);
15
th1
->SetTextAlign(11);
th1
->SetTextSize(0.12);
16
th1
->Draw();
17
18
auto
*
th2
=
new
TText
(0.33,0.493,
"Center adjusted"
);
19
th2
->SetTextAlign(21);
th2
->SetTextSize(0.12);
20
th2
->Draw();
21
22
auto
*
th3
=
new
TText
(0.33,0.823,
"Right adjusted"
);
23
th3
->SetTextAlign(31);
th3
->SetTextSize(0.12);
24
th3
->Draw();
25
26
// Vertical alignment.
27
auto
*
tv1
=
new
TText
(0.66,0.165,
"Bottom adjusted"
);
28
tv1
->SetTextAlign(11);
tv1
->SetTextSize(0.12);
29
tv1
->Draw();
30
31
auto
*
tv2
=
new
TText
(0.66,0.493,
"Center adjusted"
);
32
tv2
->SetTextAlign(12);
tv2
->SetTextSize(0.12);
33
tv2
->Draw();
34
35
auto
*
tv3
=
new
TText
(0.66,0.823,
"Top adjusted"
);
36
tv3
->SetTextAlign(13);
tv3
->SetTextSize(0.12);
37
tv3
->Draw();
38
}
kBlue
@ kBlue
Definition
Rtypes.h:66
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TAttLine::SetLineStyle
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition
TAttLine.h:42
TAttLine::SetLineColor
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition
TAttLine.h:40
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TLine
Use the TLine constructor to create a simple line.
Definition
TLine.h:22
TLine::DrawLine
virtual TLine * DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Definition
TLine.cxx:103
TText
Base class for several text objects.
Definition
TText.h:22
th3
auto * th3
Definition
textalign.C:22
lv
TLine lv
Definition
textalign.C:5
tv3
auto * tv3
Definition
textalign.C:35
th2
auto * th2
Definition
textalign.C:18
tv1
auto * tv1
Definition
textalign.C:27
tv2
auto * tv2
Definition
textalign.C:31
th1
auto * th1
Definition
textalign.C:14
core
base
doc
macros
textalign.C
ROOT v6-34 - Reference Guide Generated on Mon Mar 31 2025 06:03:27 (GVA Time) using Doxygen 1.10.0