Logo ROOT  
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#include "TCurlyLine.h"
15
16class TCurlyArc : public TCurlyLine {
17
18private:
19 Double_t fR1; ///< Radius of arc
20 Double_t fPhimin; ///< start phi (degrees)
21 Double_t fPhimax; ///< end phi (degrees)
22 Double_t fTheta; ///< used internally
23
24 static Double_t fgDefaultWaveLength; ///< default wavelength
25 static Double_t fgDefaultAmplitude; ///< default amplitude
26 static Bool_t fgDefaultIsCurly; ///< default curly type
27
28public:
29 TCurlyArc();
31 Double_t phimin, Double_t phimax,
32 Double_t wl = .02, Double_t amp = .01);
33 virtual ~TCurlyArc() {}
34
35 void Build() override;
36 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
37 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
38 Double_t GetRadius() const {return fR1;}
39 Double_t GetPhimin() const {return fPhimin;}
40 Double_t GetPhimax() const {return fPhimax;}
41 virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>fX1,y1=>fY1}
42 virtual void SetRadius(Double_t radius); // *MENU* *ARGS={radius=>fR1}
43 virtual void SetPhimin(Double_t phimin); // *MENU* *ARGS={phimin=>fPhimin}
44 virtual void SetPhimax(Double_t phimax); // *MENU* *ARGS={phimax=>fPhimax}
45 void SavePrimitive(std::ostream &out, Option_t * = "") override;
46
47 static void SetDefaultWaveLength(Double_t WaveLength);
48 static void SetDefaultAmplitude (Double_t Amplitude );
49 static void SetDefaultIsCurly (Bool_t IsCurly );
52 static Bool_t GetDefaultIsCurly ();
53
54 Rectangle_t GetBBox() override;
55 TPoint GetBBoxCenter() override;
56 void SetBBoxCenter(const TPoint &p) override;
57 void SetBBoxCenterX(const Int_t x) override;
58 void SetBBoxCenterY(const Int_t y) override;
59 void SetBBoxX1(const Int_t x) override;
60 void SetBBoxX2(const Int_t x) override;
61 void SetBBoxY1(const Int_t y) override;
62 void SetBBoxY2(const Int_t y) override;
63
64 ClassDefOverride(TCurlyArc,3) // A curly arc
65};
66
67#endif
68
bool Bool_t
Definition: RtypesCore.h:63
int Int_t
Definition: RtypesCore.h:45
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y1
Implements curly or wavy arcs used to draw Feynman diagrams.
Definition: TCurlyArc.h:16
Rectangle_t GetBBox() override
Return the bounding Box of the Line.
Definition: TCurlyArc.cxx:517
Double_t GetPhimax() const
Definition: TCurlyArc.h:40
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to an arc.
Definition: TCurlyArc.cxx:123
void SetBBoxX1(const Int_t x) override
Set left hand side of BoundingBox to a value (resize in x direction on left)
Definition: TCurlyArc.cxx:572
virtual void SetRadius(Double_t radius)
Set Curly Arc radius.
Definition: TCurlyArc.cxx:442
static Bool_t GetDefaultIsCurly()
Get default "IsCurly".
Definition: TCurlyArc.cxx:509
void Build() override
Create a curly (Gluon) or wavy (Gamma) arc.
Definition: TCurlyArc.cxx:75
virtual void SetPhimin(Double_t phimin)
Set Curly Arc minimum Phi.
Definition: TCurlyArc.cxx:451
Double_t fTheta
used internally
Definition: TCurlyArc.h:22
static Double_t GetDefaultWaveLength()
Get default wave length.
Definition: TCurlyArc.cxx:493
virtual void SetCenter(Double_t x1, Double_t y1)
Set Curly Arc center.
Definition: TCurlyArc.cxx:432
Double_t fPhimax
end phi (degrees)
Definition: TCurlyArc.h:21
void SetBBoxY2(const Int_t y) override
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition: TCurlyArc.cxx:612
Double_t GetRadius() const
Definition: TCurlyArc.h:38
void SetBBoxX2(const Int_t x) override
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition: TCurlyArc.cxx:585
TCurlyArc()
Default constructor.
Definition: TCurlyArc.cxx:45
static Double_t fgDefaultWaveLength
default wavelength
Definition: TCurlyArc.h:24
static void SetDefaultWaveLength(Double_t WaveLength)
Set default wave length.
Definition: TCurlyArc.cxx:469
static void SetDefaultAmplitude(Double_t Amplitude)
Set default wave amplitude.
Definition: TCurlyArc.cxx:477
Double_t fPhimin
start phi (degrees)
Definition: TCurlyArc.h:20
Double_t fR1
Radius of arc.
Definition: TCurlyArc.h:19
static Double_t fgDefaultAmplitude
default amplitude
Definition: TCurlyArc.h:25
static Double_t GetDefaultAmplitude()
Get default wave amplitude.
Definition: TCurlyArc.cxx:501
static void SetDefaultIsCurly(Bool_t IsCurly)
Set default "IsCurly".
Definition: TCurlyArc.cxx:485
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition: TCurlyArc.cxx:155
TPoint GetBBoxCenter() override
Return the center of the BoundingBox as TPoint in pixels.
Definition: TCurlyArc.cxx:532
static Bool_t fgDefaultIsCurly
default curly type
Definition: TCurlyArc.h:26
void SavePrimitive(std::ostream &out, Option_t *="") override
Save primitive as a C++ statement(s) on output stream out.
Definition: TCurlyArc.cxx:412
void SetBBoxCenter(const TPoint &p) override
Set center of the BoundingBox.
Definition: TCurlyArc.cxx:543
void SetBBoxCenterY(const Int_t y) override
Set Y coordinate of the center of the BoundingBox.
Definition: TCurlyArc.cxx:562
void SetBBoxY1(const Int_t y) override
Set top of BoundingBox to a value (resize in y direction on top)
Definition: TCurlyArc.cxx:597
Double_t GetPhimin() const
Definition: TCurlyArc.h:39
virtual void SetPhimax(Double_t phimax)
Set Curly Arc maximum Phi.
Definition: TCurlyArc.cxx:460
virtual ~TCurlyArc()
Definition: TCurlyArc.h:33
void SetBBoxCenterX(const Int_t x) override
Set X coordinate of the center of the BoundingBox.
Definition: TCurlyArc.cxx:553
Implements curly or wavy polylines used to draw Feynman diagrams.
Definition: TCurlyLine.h:19
Definition: TPoint.h:31
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
static constexpr double rad
Rectangle structure (maps to the X11 XRectangle structure)
Definition: GuiTypes.h:361