ROOT logo

From $ROOTSYS/tutorials/graphics/arrow.C

//Draw arrows
//Author: Rene Brun
{
   c1 = new TCanvas("c1");
   c1->Range(0,0,1,1);
   TPaveLabel par(0.1,0.8,0.9,0.95,"Examples of various arrow formats");
   par.SetFillColor(42);
   par.Draw();
   TArrow ar1(0.1,0.1,0.1,0.7);
   ar1.Draw();
   TArrow ar2(0.2,0.1,0.2,0.7,0.05,"|>");
   ar2.SetAngle(40);
   ar2.SetLineWidth(2);
   ar2.Draw();
   TArrow ar3(0.3,0.1,0.3,0.7,0.05,"<|>");
   ar3.SetAngle(40);
   ar3.SetLineWidth(2);
   ar3.Draw();
   TArrow ar4(0.46,0.7,0.82,0.42,0.07,"|>");
   ar4.SetAngle(60);
   ar4.SetLineWidth(2);
   ar4.SetFillColor(2);
   ar4.Draw();
   TArrow ar5(0.4,0.25,0.95,0.25,0.15,"<|>");
   ar5.SetAngle(60);
   ar5.SetLineWidth(4);
   ar5.SetLineColor(4);
   ar5.SetFillStyle(3008);
   ar5.SetFillColor(2);
   ar5.Draw();
   return c1;
}
 arrow.C:1
 arrow.C:2
 arrow.C:3
 arrow.C:4
 arrow.C:5
 arrow.C:6
 arrow.C:7
 arrow.C:8
 arrow.C:9
 arrow.C:10
 arrow.C:11
 arrow.C:12
 arrow.C:13
 arrow.C:14
 arrow.C:15
 arrow.C:16
 arrow.C:17
 arrow.C:18
 arrow.C:19
 arrow.C:20
 arrow.C:21
 arrow.C:22
 arrow.C:23
 arrow.C:24
 arrow.C:25
 arrow.C:26
 arrow.C:27
 arrow.C:28
 arrow.C:29
 arrow.C:30
 arrow.C:31
 arrow.C:32
 arrow.C:33
thumb