Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TArrow.h
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Rene Brun 17/10/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TArrow
13#define ROOT_TArrow
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TArrow //
19// //
20// One arrow --->. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TString.h"
25#include "TLine.h"
26#include "TAttFill.h"
27
28
29class TArrow : public TLine, public TAttFill {
30protected:
31 Float_t fAngle; ///< Arrow opening angle (degrees)
32 Float_t fArrowSize; ///< Arrow Size
33 TString fOption; ///< Arrow shapes
34
35 static Float_t fgDefaultAngle; ///< Default Arrow opening angle (degrees)
36 static Float_t fgDefaultArrowSize; ///< Default Arrow Size
37 static TString fgDefaultOption; ///< Default Arrow shapes
38
39public:
40 TArrow();
42 Float_t arrowsize=0.05, Option_t *option=">");
43 TArrow(const TArrow &arrow);
44 ~TArrow() override;
45
46 void Copy(TObject &arrow) const override;
47
48 void Draw(Option_t *option="") override;
50 Float_t arrowsize=0 ,Option_t *option="");
51 Float_t GetAngle() const {return fAngle;}
53 Option_t *GetOption() const override { return fOption.Data();}
54 void Paint(Option_t *option="") override;
56 ,Float_t arrowsize=0.05 ,Option_t *option=">");
58 ,Float_t arrowsize=0.05 ,Option_t *option=">");
59 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
60 virtual void SetAngle(Float_t angle=60) {fAngle=angle;} // *MENU*
61 virtual void SetArrowSize(Float_t arrowsize=0.05) {fArrowSize=arrowsize;} // *MENU*
62 virtual void SetOption(Option_t *option=">"){ fOption = option;}
63
64 static void SetDefaultAngle(Float_t Angle );
65 static void SetDefaultArrowSize(Float_t ArrowSize);
66 static void SetDefaultOption(Option_t *Option );
67 static Float_t GetDefaultAngle();
69 static Option_t *GetDefaultOption();
70
71 ClassDefOverride(TArrow,1) // An arrow (line with a arrowhead)
72};
73
74#endif
float Float_t
Definition RtypesCore.h:57
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
Draw all kinds of Arrows.
Definition TArrow.h:29
Float_t GetAngle() const
Definition TArrow.h:51
Option_t * GetOption() const override
Definition TArrow.h:53
static Float_t GetDefaultAngle()
Get default angle.
Definition TArrow.cxx:421
Float_t fArrowSize
Arrow Size.
Definition TArrow.h:32
static void SetDefaultOption(Option_t *Option)
Set default option.
Definition TArrow.cxx:411
static void SetDefaultArrowSize(Float_t ArrowSize)
Set default arrow sive.
Definition TArrow.cxx:402
static void SetDefaultAngle(Float_t Angle)
Set default angle.
Definition TArrow.cxx:393
static Float_t fgDefaultAngle
Default Arrow opening angle (degrees)
Definition TArrow.h:35
static Option_t * GetDefaultOption()
Get default option.
Definition TArrow.cxx:441
virtual void SetArrowSize(Float_t arrowsize=0.05)
Definition TArrow.h:61
static Float_t fgDefaultArrowSize
Default Arrow Size.
Definition TArrow.h:36
virtual TArrow * DrawArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0, Option_t *option="")
Draw this arrow with new coordinates.
Definition TArrow.cxx:135
void Paint(Option_t *option="") override
Paint this arrow with its current attributes.
Definition TArrow.cxx:157
TArrow()
Arrow default constructor.
Definition TArrow.cxx:47
Float_t fAngle
Arrow opening angle (degrees)
Definition TArrow.h:31
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TArrow.cxx:365
virtual void SetOption(Option_t *option=">")
Definition TArrow.h:62
static TString fgDefaultOption
Default Arrow shapes.
Definition TArrow.h:37
TString fOption
Arrow shapes.
Definition TArrow.h:33
virtual void PaintArrowNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow with new coordinates in NDC.
Definition TArrow.cxx:352
virtual void PaintArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0.05, Option_t *option=">")
Draw this arrow with new coordinates.
Definition TArrow.cxx:175
~TArrow() override
Arrow default destructor.
Definition TArrow.cxx:91
Float_t GetArrowSize() const
Definition TArrow.h:52
virtual void SetAngle(Float_t angle=60)
Definition TArrow.h:60
static Float_t GetDefaultArrowSize()
Get default arrow size.
Definition TArrow.cxx:431
void Copy(TObject &arrow) const override
Copy this arrow to arrow.
Definition TArrow.cxx:108
Fill Area Attributes class.
Definition TAttFill.h:19
Use the TLine constructor to create a simple line.
Definition TLine.h:22
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
th1 Draw()