ROOT  6.06/09
Reference Guide
TCurlyArc.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Otto Schaile 20/11/99
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 #ifndef ROOT_TCurlyArc
12 #define ROOT_TCurlyArc
13 
14 #ifndef ROOT_GuiTypes
15 #include "GuiTypes.h"
16 #endif
17 
18 class TPoint;
19 
20 // This class implements a curly or wavy arc typically used
21 // to draw Feynman diagrams.
22 
23 #include "TCurlyLine.h"
24 
25 class TCurlyArc : public TCurlyLine {
26 
27 private:
28  Double_t fR1; // Radius of arc
29  Double_t fPhimin; // start phi (degrees)
30  Double_t fPhimax; // end phi (degrees)
31  Double_t fTheta; // used internally
32 
33  static Double_t fgDefaultWaveLength; //default wavelength
34  static Double_t fgDefaultAmplitude; //default amplitude
35  static Bool_t fgDefaultIsCurly; //default curly type
36 
37 public:
38  TCurlyArc();
40  Double_t phimin, Double_t phimax,
41  Double_t wl = .02, Double_t amp = .01);
42  virtual ~TCurlyArc(){;}
43  virtual void Build();
45  void ExecuteEvent(Int_t event, Int_t px, Int_t py);
46  Double_t GetRadius() const {return fR1;}
47  Double_t GetPhimin() const {return fPhimin;}
48  Double_t GetPhimax() const {return fPhimax;}
49  virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>fX1,y1=>fY1}
50  virtual void SetRadius(Double_t radius); // *MENU* *ARGS={radius=>fR1}
51  virtual void SetPhimin(Double_t phimin); // *MENU* *ARGS={phimin=>fPhimin}
52  virtual void SetPhimax(Double_t phimax); // *MENU* *ARGS={phimax=>fPhimax}
53  virtual void SavePrimitive(std::ostream &out, Option_t * = "");
54 
55  static void SetDefaultWaveLength(Double_t WaveLength);
56  static void SetDefaultAmplitude (Double_t Amplitude );
57  static void SetDefaultIsCurly (Bool_t IsCurly );
59  static Double_t GetDefaultAmplitude ();
60  static Bool_t GetDefaultIsCurly ();
61  virtual Rectangle_t GetBBox();
62  virtual TPoint GetBBoxCenter();
63  virtual void SetBBoxCenter(const TPoint &p);
64  virtual void SetBBoxCenterX(const Int_t x);
65  virtual void SetBBoxCenterY(const Int_t y);
66  virtual void SetBBoxX1(const Int_t x);
67  virtual void SetBBoxX2(const Int_t x);
68  virtual void SetBBoxY1(const Int_t y);
69  virtual void SetBBoxY2(const Int_t y);
70 
71  ClassDef(TCurlyArc,3) // A curly arc
72 };
73 
74 #endif
75 
virtual void SetPhimax(Double_t phimax)
Set Curly Arc maximum Phi.
Definition: TCurlyArc.cxx:461
virtual void SetCenter(Double_t x1, Double_t y1)
Set Curly Arc center.
Definition: TCurlyArc.cxx:433
Double_t GetPhimin() const
Definition: TCurlyArc.h:47
static Double_t fgDefaultWaveLength
Definition: TCurlyArc.h:33
virtual ~TCurlyArc()
Definition: TCurlyArc.h:42
static Double_t GetDefaultAmplitude()
Get default wave amplitude.
Definition: TCurlyArc.cxx:502
ClassDef(TAttBBox2D, 0)
const char Option_t
Definition: RtypesCore.h:62
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TCurlyArc.cxx:156
static Bool_t GetDefaultIsCurly()
Get default "IsCurly".
Definition: TCurlyArc.cxx:510
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to an arc.
Definition: TCurlyArc.cxx:124
static void SetDefaultIsCurly(Bool_t IsCurly)
Set default "IsCurly".
Definition: TCurlyArc.cxx:486
static Double_t GetDefaultWaveLength()
Get default wave length.
Definition: TCurlyArc.cxx:494
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition: TCurlyArc.cxx:586
static Bool_t fgDefaultIsCurly
Definition: TCurlyArc.h:35
Double_t fR1
Definition: TCurlyArc.h:28
Double_t x[n]
Definition: legend1.C:17
Implements curly or wavy polylines used to draw Feynman diagrams.
Definition: TCurlyLine.h:32
Double_t GetPhimax() const
Definition: TCurlyArc.h:48
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
Definition: TCurlyArc.cxx:598
virtual void SetRadius(Double_t radius)
Set Curly Arc radius.
Definition: TCurlyArc.cxx:443
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the BoundingBox.
Definition: TCurlyArc.cxx:554
char * out
Definition: TBase64.cxx:29
static Double_t fgDefaultAmplitude
Definition: TCurlyArc.h:34
Definition: TPoint.h:33
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition: TCurlyArc.cxx:613
virtual void Build()
Create a curly (Gluon) or wavy (Gamma) arc.
Definition: TCurlyArc.cxx:76
virtual void SetPhimin(Double_t phimin)
Set Curly Arc minimum Phi.
Definition: TCurlyArc.cxx:452
virtual Rectangle_t GetBBox()
Return the bounding Box of the Line.
Definition: TCurlyArc.cxx:518
static void SetDefaultAmplitude(Double_t Amplitude)
Set default wave amplitude.
Definition: TCurlyArc.cxx:478
Double_t fPhimin
Definition: TCurlyArc.h:29
Double_t GetRadius() const
Definition: TCurlyArc.h:46
virtual TPoint GetBBoxCenter()
Return the center of the BoundingBox as TPoint in pixels.
Definition: TCurlyArc.cxx:533
virtual void SetBBoxX1(const Int_t x)
Set left hand side of BoundingBox to a value (resize in x direction on left)
Definition: TCurlyArc.cxx:573
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TCurlyArc.cxx:413
Double_t y[n]
Definition: legend1.C:17
Double_t fPhimax
Definition: TCurlyArc.h:30
Double_t fTheta
Definition: TCurlyArc.h:31
virtual void SetBBoxCenter(const TPoint &p)
Set center of the BoundingBox.
Definition: TCurlyArc.cxx:544
static void SetDefaultWaveLength(Double_t WaveLength)
Set default wave length.
Definition: TCurlyArc.cxx:470
Implements curly or wavy arcs used to draw Feynman diagrams.
Definition: TCurlyArc.h:25
virtual void SetBBoxCenterY(const Int_t y)
Set Y coordinate of the center of the BoundingBox.
Definition: TCurlyArc.cxx:563