ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ellipse.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// Draw ellipses.
4 ///
5 /// \macro_image
6 /// \macro_code
7 ///
8 /// \author Rene Brun
9 
10 TCanvas *ellipse(){
11  TCanvas *c1 = new TCanvas("c1");
12  c1->Range(0,0,1,1);
13  TPaveLabel *pel = new TPaveLabel(0.1,0.8,0.9,0.95,"Examples of Ellipses");
14  pel->SetFillColor(42);
15  pel->Draw();
16  TEllipse *el1 = new TEllipse(0.25,0.25,.1,.2);
17  el1->Draw();
18  TEllipse *el2 = new TEllipse(0.25,0.6,.2,.1);
19  el2->SetFillColor(6);
20  el2->SetFillStyle(3008);
21  el2->Draw();
22  TEllipse *el3 = new TEllipse(0.75,0.6,.2,.1,45,315);
23  el3->SetFillColor(2);
24  el3->SetFillStyle(1001);
25  el3->SetLineColor(4);
26  el3->Draw();
27  TEllipse *el4 = new TEllipse(0.75,0.25,.2,.15,45,315,62);
28  el4->SetFillColor(5);
29  el4->SetFillStyle(1001);
30  el4->SetLineColor(4);
31  el4->SetLineWidth(6);
32  el4->Draw();
33  return c1;
34 }
virtual void SetLineWidth(Width_t lwidth)
Definition: TAttLine.h:57
TCanvas * c1
Definition: legend1.C:2
virtual void SetFillStyle(Style_t fstyle)
Definition: TAttFill.h:52
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
Definition: TEllipse.cxx:167
A Pave (see TPave) with a text centered in the Pave.
Definition: TPaveLabel.h:32
virtual void SetLineColor(Color_t lcolor)
Definition: TAttLine.h:54
virtual void SetFillColor(Color_t fcolor)
Definition: TAttFill.h:50
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:4623
The Canvas class.
Definition: TCanvas.h:48
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:77
Draw Ellipses.
Definition: TEllipse.h:44