ROOT
6.08/07
Reference Guide
tutorials
graphics
diamond.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_graphics
3
/// \notebook
4
/// Draw a diamond.
5
///
6
/// \macro_image
7
/// \macro_code
8
///
9
/// \author Olivier Couet
10
11
TCanvas
*diamond(){
12
TCanvas
*
c
=
new
TCanvas
(
"c"
);
13
TDiamond
*d =
new
TDiamond
(.05,.1,.95,.8);
14
15
d->
AddText
(
"A TDiamond can contain any text."
);
16
17
d->
Draw
();
18
return
c
;
19
}
TDiamond::Draw
virtual void Draw(Option_t *option="")
Draw this diamond with its current attributes.
Definition:
TDiamond.cxx:94
c
return c
Definition:
entrylist_figure1.C:47
TPaveText::AddText
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Definition:
TPaveText.cxx:160
TDiamond
Draw a Diamond.
Definition:
TDiamond.h:27
TCanvas
The Canvas class.
Definition:
TCanvas.h:41