Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
arrows.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// \notebook -js
4 /// Draw arrows.
5 ///
6 /// \macro_image (js)
7 /// \macro_code
8 ///
9 /// \author Rene Brun
10 
11 void arrows(){
12  TCanvas *c1 = new TCanvas("c1");
13  c1->Range(0,0,1,1);
14 
15  TPaveLabel *par = new TPaveLabel(0.1,0.8,0.9,0.95,"Examples of various arrows formats");
16  par->SetFillColor(42);
17  par->Draw();
18 
19  TArrow *ar1 = new TArrow(0.1,0.1,0.1,0.7);
20  ar1->Draw();
21  TArrow *ar2 = new TArrow(0.2,0.1,0.2,0.7,0.05,"|>");
22  ar2->SetAngle(40);
23  ar2->SetLineWidth(2);
24  ar2->Draw();
25  TArrow *ar3 = new TArrow(0.3,0.1,0.3,0.7,0.05,"<|>");
26  ar3->SetAngle(40);
27  ar3->SetLineWidth(2);
28  ar3->Draw();
29  TArrow *ar4 = new TArrow(0.46,0.7,0.82,0.42,0.07,"|>");
30  ar4->SetAngle(60);
31  ar4->SetLineWidth(2);
32  ar4->SetFillColor(2);
33  ar4->Draw();
34  TArrow *ar5 = new TArrow(0.4,0.25,0.95,0.25,0.15,"<|>");
35  ar5->SetAngle(60);
36  ar5->SetLineWidth(4);
37  ar5->SetLineColor(4);
38  ar5->SetFillStyle(3008);
39  ar5->SetFillColor(2);
40  ar5->Draw();
41 }