ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
core
base
doc
macros
fonts.C
Go to the documentation of this file.
1
void
drawtext
(
double
x
,
double
y
,
int
f
,
const
char
*s)
2
{
3
TLatex
*t =
new
TLatex
(x,y,
Form
(
"#font[41]{%d :} %s"
,f,s));
4
t->
SetTextFont
(f);
5
t->
SetTextAlign
(12);
6
t->
SetTextSize
(0.048);
7
t->
Draw
();
8
}
9
10
TCanvas
*
fonts
()
11
{
12
TCanvas
*Tf =
new
TCanvas
(
"Tf"
,
"Tf"
,0,0,500,700);
13
Tf->
Range
(0,0,1,1);
14
Tf->
SetBorderSize
(2);
15
Tf->
SetFrameFillColor
(0);
16
17
double
y
= 0.95;
18
for
(
int
f
= 12;
f
<=152;
f
+=10) {
19
if
(
f
!=142)
drawtext
(0.02,y,
f
,
"ABCDEFGH abcdefgh 0123456789 @#$"
);
20
else
drawtext
(0.02,y,
f
,
"ABCD efgh 01234 @#$"
);
21
y -= 0.065;
22
}
23
return
Tf;
24
}
TObject::Draw
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition:
TObject.cxx:254
TAttText::SetTextFont
virtual void SetTextFont(Font_t tfont=62)
Definition:
TAttText.h:59
x
Double_t x[n]
Definition:
legend1.C:17
TLatex
To draw Mathematical Formula.
Definition:
TLatex.h:33
fonts
TCanvas * fonts()
Definition:
fonts.C:10
TAttText::SetTextAlign
virtual void SetTextAlign(Short_t align=11)
Definition:
TAttText.h:55
TPad::Range
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Definition:
TPad.cxx:4627
Form
char * Form(const char *fmt,...)
TCanvas
The Canvas class.
Definition:
TCanvas.h:48
f
double f(double x)
Definition:
testIntegration.cxx:12
drawtext
void drawtext(double x, double y, int f, const char *s)
Definition:
fonts.C:1
y
Double_t y[n]
Definition:
legend1.C:17
TAttPad::SetFrameFillColor
void SetFrameFillColor(Color_t color=1)
Definition:
TAttPad.h:83
TPad::SetBorderSize
virtual void SetBorderSize(Short_t bordersize)
Definition:
TPad.h:317
TAttText::SetTextSize
virtual void SetTextSize(Float_t tsize=1)
Definition:
TAttText.h:60