ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
subsupscript.C
Go to the documentation of this file.
2 {
3  TCanvas *S = new TCanvas("script","Subscripts and Superscripts",400,250);
4 
5  TLatex Tl;
6  Tl.SetTextSize(0.09);
7  Tl.SetTextAlign(12);
8  TLatex Tt;
9  Tt.SetTextSize(0.09);
10  Tt.SetTextFont(82);
11  Tt.SetTextAlign(12);
12 
13  // Draw First Column
14  float y, x1, x2;
15  float step = 0.3;
16  y = 0.80; x1 = 0.02; x2 = x1+0.3;
17 
18  Tl.DrawLatex(x2, y, "x^{2y}") ; Tt.DrawText(x1, y, "x^{2y}");
19  y -= step ; Tl.DrawLatex(x2, y, "x_{2y}") ; Tt.DrawText(x1, y, "x_{2y}");
20  y -= step ; Tl.DrawLatex(x2, y, "x^{y^{2}}") ; Tt.DrawText(x1, y, "x^{y^{2}}");
21 
22 
23  // Draw Second Column
24  y = 0.80; x1 = 0.52; x2 = x1+0.3;
25  Tl.DrawLatex(x2, y, "x^{y_{1}}") ; Tt.DrawText(x1, y, "x^{y_{1}}");
26  y -= step ; Tl.DrawLatex(x2, y, "x^{y}_{1}") ; Tt.DrawText(x1, y, "x^{y}_{1}");
27  y -= step ; Tl.DrawLatex(x2, y, "x_{1}^{y}") ; Tt.DrawText(x1, y, "x_{1}^{y}");
28 
29  return S;
30 }
virtual void SetTextFont(Font_t tfont=62)
Definition: TAttText.h:59
static const double x2[5]
To draw Mathematical Formula.
Definition: TLatex.h:33
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
Definition: TLatex.cxx:1901
virtual void SetTextAlign(Short_t align=11)
Definition: TAttText.h:55
TCanvas * subsupscript()
Definition: subsupscript.C:1
The Canvas class.
Definition: TCanvas.h:48
static const double x1[5]
static const float S
Definition: mandel.cpp:113
Double_t y[n]
Definition: legend1.C:17
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
Definition: TText.cxx:171
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60