ROOT logo
// @(#)root/graf:$Id: TArrow.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   17/10/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TArrow
#define ROOT_TArrow


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TArrow                                                               //
//                                                                      //
// One arrow --->.                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TLine
#include "TLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif


class TArrow : public TLine, public TAttFill {
protected:
   Float_t      fAngle;        //Arrow opening angle (degrees)
   Float_t      fArrowSize;    //Arrow Size
   TString      fOption;       //Arrow shapes

   static Float_t      fgDefaultAngle;        //default Arrow opening angle (degrees)
   static Float_t      fgDefaultArrowSize;    //default Arrow Size
   static TString      fgDefaultOption;       //default Arrow shapes

public:
   TArrow();
   TArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
         ,Float_t arrowsize=0.05
         ,Option_t *option=">");
   TArrow(const TArrow &arrow);
   virtual ~TArrow();
   void Copy(TObject &arrow) const;

   virtual void   Draw(Option_t *option="");
   virtual void   DrawArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
                               ,Float_t arrowsize=0 ,Option_t *option="");
   Float_t        GetAngle() const {return fAngle;}
   Float_t        GetArrowSize() const {return fArrowSize;}
   Option_t      *GetOption() const { return fOption.Data();}
   virtual void   Paint(Option_t *option="");
   virtual void   PaintArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
                                 ,Float_t arrowsize=0.05 ,Option_t *option=">");
   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
   virtual void   SetAngle(Float_t angle=60) {fAngle=angle;} // *MENU*
   virtual void   SetArrowSize(Float_t arrowsize=0.05) {fArrowSize=arrowsize;} // *MENU*
   virtual void   SetOption(Option_t *option=">"){ fOption = option;}

   static void SetDefaultAngle     (Float_t  Angle    );
   static void SetDefaultArrowSize (Float_t  ArrowSize);  
   static void SetDefaultOption    (Option_t *Option  );
   static Float_t GetDefaultAngle    ();
   static Float_t GetDefaultArrowSize();
   static Option_t *GetDefaultOption ();

   ClassDef(TArrow,1)  // An arrow (line with a arrowhead)
};

#endif
 TArrow.h:1
 TArrow.h:2
 TArrow.h:3
 TArrow.h:4
 TArrow.h:5
 TArrow.h:6
 TArrow.h:7
 TArrow.h:8
 TArrow.h:9
 TArrow.h:10
 TArrow.h:11
 TArrow.h:12
 TArrow.h:13
 TArrow.h:14
 TArrow.h:15
 TArrow.h:16
 TArrow.h:17
 TArrow.h:18
 TArrow.h:19
 TArrow.h:20
 TArrow.h:21
 TArrow.h:22
 TArrow.h:23
 TArrow.h:24
 TArrow.h:25
 TArrow.h:26
 TArrow.h:27
 TArrow.h:28
 TArrow.h:29
 TArrow.h:30
 TArrow.h:31
 TArrow.h:32
 TArrow.h:33
 TArrow.h:34
 TArrow.h:35
 TArrow.h:36
 TArrow.h:37
 TArrow.h:38
 TArrow.h:39
 TArrow.h:40
 TArrow.h:41
 TArrow.h:42
 TArrow.h:43
 TArrow.h:44
 TArrow.h:45
 TArrow.h:46
 TArrow.h:47
 TArrow.h:48
 TArrow.h:49
 TArrow.h:50
 TArrow.h:51
 TArrow.h:52
 TArrow.h:53
 TArrow.h:54
 TArrow.h:55
 TArrow.h:56
 TArrow.h:57
 TArrow.h:58
 TArrow.h:59
 TArrow.h:60
 TArrow.h:61
 TArrow.h:62
 TArrow.h:63
 TArrow.h:64
 TArrow.h:65
 TArrow.h:66
 TArrow.h:67
 TArrow.h:68
 TArrow.h:69
 TArrow.h:70
 TArrow.h:71
 TArrow.h:72
 TArrow.h:73
 TArrow.h:74
 TArrow.h:75
 TArrow.h:76
 TArrow.h:77
 TArrow.h:78