Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
crown.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_graphics
3/// \notebook
4/// Draw crowns.
5///
6/// \macro_image
7/// \macro_code
8///
9/// \author Olivier Couet
10
11TCanvas *crown(){
12 TCanvas *c1 = new TCanvas("c1","c1",400,400);
13 TCrown *cr1 = new TCrown(.5,.5,.3,.4);
14 cr1->SetLineStyle(2);
15 cr1->SetLineWidth(4);
16 cr1->Draw();
17 TCrown *cr2 = new TCrown(.5,.5,.2,.3,45,315);
18 cr2->SetFillColor(38);
19 cr2->SetFillStyle(3010);
20 cr2->Draw();
21 TCrown *cr3 = new TCrown(.5,.5,.2,.3,-45,45);
22 cr3->SetFillColor(50);
23 cr3->SetFillStyle(3025);
24 cr3->Draw();
25 TCrown *cr4 = new TCrown(.5,.5,.0,.2);
26 cr4->SetFillColor(4);
27 cr4->SetFillStyle(3008);
28 cr4->Draw();
29 return c1;
30}
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 SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:42
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
The Canvas class.
Definition TCanvas.h:23
To draw a Crown.
Definition TCrown.h:19
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
Definition TEllipse.cxx:168
return c1
Definition legend1.C:41