Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TArrow.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   17/10/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TArrow
0013 #define ROOT_TArrow
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TArrow                                                               //
0019 //                                                                      //
0020 // One arrow --->.                                                      //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TString.h"
0025 #include "TLine.h"
0026 #include "TAttFill.h"
0027 
0028 
0029 class TArrow : public TLine, public TAttFill {
0030 protected:
0031    Float_t      fAngle;        ///< Arrow opening angle (degrees)
0032    Float_t      fArrowSize;    ///< Arrow Size
0033    TString      fOption;       ///< Arrow shapes
0034 
0035    static Float_t      fgDefaultAngle;        ///< Default Arrow opening angle (degrees)
0036    static Float_t      fgDefaultArrowSize;    ///< Default Arrow Size
0037    static TString      fgDefaultOption;       ///< Default Arrow shapes
0038 
0039 public:
0040    TArrow();
0041    TArrow(Double_t x1, Double_t y1, Double_t x2 ,Double_t y2,
0042           Float_t arrowsize=0.05, Option_t *option=">");
0043    TArrow(const TArrow &arrow);
0044    ~TArrow() override;
0045 
0046    void Copy(TObject &arrow) const override;
0047 
0048    void            Draw(Option_t *option="") override;
0049    virtual TArrow *DrawArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
0050                              Float_t arrowsize=0 ,Option_t *option="");
0051    Float_t         GetAngle() const {return fAngle;}
0052    Float_t         GetArrowSize() const {return fArrowSize;}
0053    Option_t       *GetOption() const override { return fOption.Data();}
0054    void            Paint(Option_t *option="") override;
0055    virtual void    PaintArrow(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2
0056                              ,Float_t arrowsize=0.05 ,Option_t *option=">");
0057    virtual void    PaintArrowNDC(Double_t u1, Double_t v1,Double_t u2 ,Double_t v2
0058                              ,Float_t arrowsize=0.05 ,Option_t *option=">");
0059    void            SavePrimitive(std::ostream &out, Option_t *option = "") override;
0060    virtual void    SetAngle(Float_t angle=60) {fAngle=angle;} // *MENU*
0061    virtual void    SetArrowSize(Float_t arrowsize=0.05) {fArrowSize=arrowsize;} // *MENU*
0062    virtual void    SetOption(Option_t *option=">"){ fOption = option;}
0063 
0064    static void SetDefaultAngle(Float_t  Angle    );
0065    static void SetDefaultArrowSize(Float_t  ArrowSize);
0066    static void SetDefaultOption(Option_t *Option  );
0067    static Float_t GetDefaultAngle();
0068    static Float_t GetDefaultArrowSize();
0069    static Option_t *GetDefaultOption();
0070 
0071    ClassDefOverride(TArrow,1)  // An arrow (line with a arrowhead)
0072 };
0073 
0074 #endif