ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
diamond.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// Draw a diamond.
4 ///
5 /// \macro_image
6 /// \macro_code
7 ///
8 /// \author Olivier Couet
9 
10 TCanvas *diamond(){
11  TCanvas *c = new TCanvas("c");
12  TDiamond *d = new TDiamond(.05,.1,.95,.8);
13 
14  d->AddText("A TDiamond can contain any text.");
15 
16  d->Draw();
17  return c;
18 }
virtual void Draw(Option_t *option="")
Draw this diamond with its current attributes.
Definition: TDiamond.cxx:94
return c
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
Draw a Diamond.
Definition: TDiamond.h:35
The Canvas class.
Definition: TCanvas.h:48