Logo ROOT  
Reference Guide
No Matches
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_graphics
3/// \notebook -js
4/// Draw ellipses.
6/// \macro_image
7/// \macro_code
9/// \author Rene Brun
11TCanvas *ellipse(){
12 TCanvas *c1 = new TCanvas("c1");
13 c1->Range(0,0,1,1);
14 TPaveLabel *pel = new TPaveLabel(0.1,0.8,0.9,0.95,"Examples of Ellipses");
15 pel->SetFillColor(42);
16 pel->Draw();
17 TEllipse *el1 = new TEllipse(0.25,0.25,.1,.2);
18 el1->Draw();
19 TEllipse *el2 = new TEllipse(0.25,0.6,.2,.1);
20 el2->SetFillColor(6);
21 el2->SetFillStyle(3008);
22 el2->Draw();
23 TEllipse *el3 = new TEllipse(0.75,0.6,.2,.1,45,315);
24 el3->SetFillColor(2);
25 el3->SetFillStyle(1001);
26 el3->SetLineColor(4);
27 el3->Draw();
28 TEllipse *el4 = new TEllipse(0.75,0.25,.2,.15,45,315,62);
29 el4->SetFillColor(5);
30 el4->SetFillStyle(1001);
31 el4->SetLineColor(4);
32 el4->SetLineWidth(6);
33 el4->Draw();
34 return c1;
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:37
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition TAttFill.h:39
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
The Canvas class.
Definition TCanvas.h:23
Draw Ellipses.
Definition TEllipse.h:23
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
Definition TEllipse.cxx:168
A Pave (see TPave) with a text centered in the Pave.
Definition TPaveLabel.h:20
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
return c1
Definition legend1.C:41