ROOT logo
ROOT » GRAF2D » GRAF » TCurlyArc

class TCurlyArc: public TCurlyLine


 This class implements curly or wavy arcs typically used to draw Feynman diagrams.
 Amplitudes and wavelengths may be specified in the constructors,
 via commands or interactively from popup menus.
 The class make use of TCurlyLine by inheritance, ExecuteEvent methods
 are highly inspired from the methods used in TPolyLine and TArc.
 The picture below has been generated by the tutorial feynman.

/* */

Function Members (Methods)

public:
TCurlyArc()
TCurlyArc(const TCurlyArc&)
TCurlyArc(Double_t x1, Double_t y1, Double_t rad, Double_t phimin, Double_t phimax, Double_t wl = .02, Double_t amp = .01)
virtual~TCurlyArc()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidBuild()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTPolyLine::Copy(TObject& polyline) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidTPolyLine::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTPolyLine::DrawPolyLine(Int_t n, Double_t* x, Double_t* y, Option_t* option = "")
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Double_tTCurlyLine::GetAmplitude() const
virtual Rectangle_tGetBBox()
virtual TPointGetBBoxCenter()
Bool_tTCurlyLine::GetCurly() const
static Double_tGetDefaultAmplitude()
static Bool_tGetDefaultIsCurly()
static Double_tGetDefaultWaveLength()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tTCurlyLine::GetEndX() const
Double_tTCurlyLine::GetEndY() const
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
virtual const char*TObject::GetIconName() const
virtual Int_tTPolyLine::GetLastPoint() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
Int_tTPolyLine::GetN() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TPolyLine::GetOption() const
Double_tGetPhimax() const
Double_tGetPhimin() const
Double_tGetRadius() const
Double_tTCurlyLine::GetStartX() const
Double_tTCurlyLine::GetStartY() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tTCurlyLine::GetWaveLength() const
Double_t*TPolyLine::GetX() const
Double_t*TPolyLine::GetY() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
Bool_tTObject::IsZombie() const
virtual voidTPolyLine::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tTPolyLine::Merge(TCollection* list)
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTPolyLine::Paint(Option_t* option = "")
virtual voidTPolyLine::PaintPolyLine(Int_t n, Double_t* x, Double_t* y, Option_t* option = "")
virtual voidTPolyLine::PaintPolyLineNDC(Int_t n, Double_t* x, Double_t* y, Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTPolyLine::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidSavePrimitive(ostream& out, Option_t* = "")
virtual voidTCurlyLine::SetAmplitude(Double_t x)MENU
virtual voidSetBBoxCenter(const TPoint& p)
virtual voidSetBBoxCenterX(const Int_t x)
virtual voidSetBBoxCenterY(const Int_t y)
virtual voidSetBBoxX1(const Int_t x)
virtual voidSetBBoxX2(const Int_t x)
virtual voidSetBBoxY1(const Int_t y)
virtual voidSetBBoxY2(const Int_t y)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetCenter(Double_t x1, Double_t y1)MENU
virtual voidTCurlyLine::SetCurly()MENU
static voidSetDefaultAmplitude(Double_t Amplitude)
static voidSetDefaultIsCurly(Bool_t IsCurly)
static voidSetDefaultWaveLength(Double_t WaveLength)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTCurlyLine::SetEndPoint(Double_t x2, Double_t y2)
virtual voidTAttFill::SetFillAttributes()MENU
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillColorAlpha(Color_t fcolor, Float_t falpha)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTPolyLine::SetNDC(Bool_t isNDC = kTRUE)
virtual Int_tTPolyLine::SetNextPoint(Double_t x, Double_t y)MENU
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTPolyLine::SetOption(Option_t* option = "")
virtual voidSetPhimax(Double_t phimax)MENU
virtual voidSetPhimin(Double_t phimin)MENU
virtual voidTPolyLine::SetPoint(Int_t point, Double_t x, Double_t y)MENU
virtual voidTPolyLine::SetPolyLine(Int_t n)
virtual voidTPolyLine::SetPolyLine(Int_t n, Float_t* x, Float_t* y, Option_t* option = "")
virtual voidTPolyLine::SetPolyLine(Int_t n, Double_t* x, Double_t* y3, Option_t* option = "")
virtual voidSetRadius(Double_t radius)MENU
virtual voidTCurlyLine::SetStartPoint(Double_t x1, Double_t y1)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTCurlyLine::SetWaveLength(Double_t WaveLength)MENU
virtual voidTCurlyLine::SetWavy()MENU
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTPolyLine::Size() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TPolyLine&TPolyLine::operator=(const TPolyLine&)

Data Members

protected:
Double_tTCurlyLine::fAmplitudeamplitude of sinusoid in percent of pad height
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Bool_tTCurlyLine::fIsCurlytrue: Gluon, false: Gamma
Int_tTPolyLine::fLastPointThe index of the last filled point
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Int_tTPolyLine::fNNumber of points
Int_tTCurlyLine::fNstepsused internally (controls precision)
TStringTPolyLine::fOptionoptions
Double_tTCurlyLine::fWaveLengthwavelength of sinusoid in percent of pad height
Double_t*TPolyLine::fX[fN] Array of X coordinates
Double_tTCurlyLine::fX1start x, center for arc
Double_tTCurlyLine::fX2end x
Double_t*TPolyLine::fY[fN] Array of Y coordinates
Double_tTCurlyLine::fY1start y, center for arc
Double_tTCurlyLine::fY2end y
static Double_tTCurlyLine::fgDefaultAmplitudedefault amplitude
static Bool_tTCurlyLine::fgDefaultIsCurlydefault curly type
static Double_tTCurlyLine::fgDefaultWaveLengthdefault wavelength
private:
Double_tfPhimaxend phi (degrees)
Double_tfPhiminstart phi (degrees)
Double_tfR1Radius of arc
Double_tfThetaused internally
static Double_tfgDefaultAmplitudedefault amplitude
static Bool_tfgDefaultIsCurlydefault curly type
static Double_tfgDefaultWaveLengthdefault wavelength

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TCurlyArc()
 Default constructor
TCurlyArc(Double_t x1, Double_t y1, Double_t rad, Double_t phimin, Double_t phimax, Double_t wl = .02, Double_t amp = .01)
 create a new TCurlyarc with center (x1, y1) and radius rad.
 The wavelength and amplitude are given in percent of the line length
 phimin and phimax are given in degrees.
void Build()
 Create a curly (Gluon) or wavy (Gamma) arc.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Compute distance from point px,py to an arc.

  Compute the closest distance of approach from point px,py to this arc.
  The distance is computed in pixels units.

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event.

  This member function is called when a TCurlyArc is clicked with the locator

  If Left button clicked on one of the line end points, this point
     follows the cursor until button is released.

  if Middle button clicked, the line is moved parallel to itself
     until the button is released.
void SavePrimitive(ostream& out, Option_t* = "")
 Save primitive as a C++ statement(s) on output stream out
void SetCenter(Double_t x1, Double_t y1)
 Set Curly Arc center.
void SetRadius(Double_t radius)
 Set Curly Arc radius.
void SetPhimin(Double_t phimin)
 Set Curly Arc minimum Phi.
void SetPhimax(Double_t phimax)
 Set Curly Arc maximum Phi.
void SetDefaultWaveLength(Double_t WaveLength)
 Set default wave length.
void SetDefaultAmplitude(Double_t Amplitude)
 Set default wave amplitude.
void SetDefaultIsCurly(Bool_t IsCurly)
 Set default "IsCurly".
Double_t GetDefaultWaveLength()
 Get default wave length.
Double_t GetDefaultAmplitude()
 Get default wave amplitude.
Bool_t GetDefaultIsCurly()
 Get default "IsCurly".
Rectangle_t GetBBox()
 Return the bounding Box of the Line
TPoint GetBBoxCenter()
 Return the center of the BoundingBox as TPoint in pixels
void SetBBoxCenter(const TPoint& p)
 Set center of the BoundingBox
void SetBBoxCenterX(const Int_t x)
 Set X coordinate of the center of the BoundingBox
void SetBBoxCenterY(const Int_t y)
 Set Y coordinate of the center of the BoundingBox
void SetBBoxX1(const Int_t x)
 Set lefthandside of BoundingBox to a value
 (resize in x direction on left)
void SetBBoxX2(const Int_t x)
 Set righthandside of BoundingBox to a value
 (resize in x direction on right)
void SetBBoxY1(const Int_t y)
 Set top of BoundingBox to a value (resize in y direction on top)
void SetBBoxY2(const Int_t y)
 Set bottom of BoundingBox to a value
 (resize in y direction on bottom)
TCurlyArc()
virtual ~TCurlyArc()
{;}
Double_t GetRadius() const
{return fR1;}
Double_t GetPhimin() const
{return fPhimin;}
Double_t GetPhimax() const
{return fPhimax;}