Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 #include "GuiTypes.h"
15 
16 class TPoint;
17 
18 #include "TCurlyLine.h"
19 
20 class TCurlyArc : public TCurlyLine {
21 
22 private:
23  Double_t fR1; ///< Radius of arc
24  Double_t fPhimin; ///< start phi (degrees)
25  Double_t fPhimax; ///< end phi (degrees)
26  Double_t fTheta; ///< used internally
27 
28  static Double_t fgDefaultWaveLength; ///< default wavelength
29  static Double_t fgDefaultAmplitude; ///< default amplitude
30  static Bool_t fgDefaultIsCurly; ///< default curly type
31 
32 public:
33  TCurlyArc();
34  TCurlyArc(Double_t x1, Double_t y1, Double_t rad,
35  Double_t phimin, Double_t phimax,
36  Double_t wl = .02, Double_t amp = .01);
37  virtual ~TCurlyArc(){;}
38  virtual void Build();
39  Int_t DistancetoPrimitive(Int_t px, Int_t py);
40  void ExecuteEvent(Int_t event, Int_t px, Int_t py);
41  Double_t GetRadius() const {return fR1;}
42  Double_t GetPhimin() const {return fPhimin;}
43  Double_t GetPhimax() const {return fPhimax;}
44  virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>fX1,y1=>fY1}
45  virtual void SetRadius(Double_t radius); // *MENU* *ARGS={radius=>fR1}
46  virtual void SetPhimin(Double_t phimin); // *MENU* *ARGS={phimin=>fPhimin}
47  virtual void SetPhimax(Double_t phimax); // *MENU* *ARGS={phimax=>fPhimax}
48  virtual void SavePrimitive(std::ostream &out, Option_t * = "");
49 
50  static void SetDefaultWaveLength(Double_t WaveLength);
51  static void SetDefaultAmplitude (Double_t Amplitude );
52  static void SetDefaultIsCurly (Bool_t IsCurly );
53  static Double_t GetDefaultWaveLength();
54  static Double_t GetDefaultAmplitude ();
55  static Bool_t GetDefaultIsCurly ();
56  virtual Rectangle_t GetBBox();
57  virtual TPoint GetBBoxCenter();
58  virtual void SetBBoxCenter(const TPoint &p);
59  virtual void SetBBoxCenterX(const Int_t x);
60  virtual void SetBBoxCenterY(const Int_t y);
61  virtual void SetBBoxX1(const Int_t x);
62  virtual void SetBBoxX2(const Int_t x);
63  virtual void SetBBoxY1(const Int_t y);
64  virtual void SetBBoxY2(const Int_t y);
65 
66  ClassDef(TCurlyArc,3) // A curly arc
67 };
68 
69 #endif
70