ROOT logo
ROOT » GRAF2D » GRAF » TCurlyLine

class TCurlyLine: public TPolyLine


 This class implements curly or wavy polylines 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 TPolyLine 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:
TCurlyLine()
TCurlyLine(const TCurlyLine&)
TCurlyLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t wl = .02, Double_t amp = .01)
virtual~TCurlyLine()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidBuild()
static TClass*Class()
static TClass*TPolyLine::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
voidTAttFill::Copy(TAttFill& attfill) const
voidTAttLine::Copy(TAttLine& attline) const
virtual voidTObject::Copy(TObject& object) 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 Int_tTPolyLine::DistancetoPrimitive(Int_t px, Int_t py)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTPolyLine::Draw(Option_t* option = "")
virtual voidTObject::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 voidTPolyLine::ExecuteEvent(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_tGetAmplitude() const
Bool_tGetCurly() const
static Double_tGetDefaultAmplitude()
static Bool_tGetDefaultIsCurly()
static Double_tGetDefaultWaveLength()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tGetEndX() const
Double_tGetEndY() 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
virtual Option_t*TObject::GetOption() const
Double_tGetStartX() const
Double_tGetStartY() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetWaveLength() 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 TClass*TPolyLine::IsA() const
virtual TClass*TAttFill::IsA() const
virtual TClass*TAttLine::IsA() const
virtual TClass*TObject::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
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tTPolyLine::Merge(TCollection* list)
virtual voidTAttFill::Modify()
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
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)
TAttFill&TAttFill::operator=(const TAttFill&)
TAttLine&TAttLine::operator=(const TAttLine&)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTPolyLine::Paint(Option_t* option = "")
virtual voidTObject::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 voidTObject::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 voidTPolyLine::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual voidSetAmplitude(Double_t x)MENU
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetCurly()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 voidSetEndPoint(Double_t x2, Double_t y2)
virtual voidTAttFill::SetFillAttributes()MENU
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
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 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 voidSetStartPoint(Double_t x1, Double_t y1)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetWaveLength(Double_t WaveLength)MENU
virtual voidSetWavy()MENU
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTPolyLine::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTAttFill::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTAttLine::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTPolyLine::Size() const
virtual voidStreamer(TBuffer& b)
virtual voidTPolyLine::Streamer(TBuffer& b)
virtual voidTAttFill::Streamer(TBuffer& b)
virtual voidTAttLine::Streamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTPolyLine::StreamerNVirtual(TBuffer& b)
voidTAttFill::StreamerNVirtual(TBuffer& b)
voidTAttLine::StreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(TBuffer& 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

private:
enum { kTooShort
};
enum TPolyLine::[unnamed] { kPolyLineNDC
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Double_tfAmplitudeamplitude of sinusoid in percent of pad height
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Bool_tfIsCurlytrue: 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_tfNstepsused internally (controls precision)
TStringTPolyLine::fOptionoptions
Double_tfWaveLengthwavelength of sinusoid in percent of pad height
Double_t*TPolyLine::fX[fN] Array of X coordinates
Double_tfX1start x, center for arc
Double_tfX2end x
Double_t*TPolyLine::fY[fN] Array of Y coordinates
Double_tfY1start y, center for arc
Double_tfY2end y
static Double_tfgDefaultAmplitudedefault amplitude
static Bool_tfgDefaultIsCurlydefault curly type
static Double_tfgDefaultWaveLengthdefault wavelength

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TCurlyLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t wl = .02, Double_t amp = .01)
 Create a new TCurlyLine with starting point (x1, y1), end point (x2,y2).
 The wavelength and amplitude are given in percent of the pad height.
void Build()
 Create a curly (Gluon) or wavy (Gamma) line.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Compute distance from point px,py to a line.
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event.

  This member function is called when a  TCurlyLine 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 SetCurly()
 Set curly.
void SetWavy()
 Set wavy.
void SetWaveLength(Double_t WaveLength)
 Set wave length.
void SetAmplitude(Double_t x)
 Set amplitude.
void SetStartPoint(Double_t x1, Double_t y1)
 Set start point.
void SetEndPoint(Double_t x2, Double_t y2)
 Set edn point.
void SetDefaultWaveLength(Double_t WaveLength)
 Set default wave length.
void SetDefaultAmplitude(Double_t Amplitude)
 Set default amplitude.
void SetDefaultIsCurly(Bool_t IsCurly)
 Set defaul "IsCurly".
Double_t GetDefaultWaveLength()
 Get default wave length.
Double_t GetDefaultAmplitude()
 Get default amplitude.
Bool_t GetDefaultIsCurly()
 Get default "IsCurly".
TCurlyLine()
{;}
TCurlyLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t wl = .02, Double_t amp = .01)
{;}
Bool_t GetCurly() const
{return fIsCurly;}
Double_t GetWaveLength() const
{return fWaveLength;}
Double_t GetAmplitude() const
{return fAmplitude;}
Double_t GetStartX() const
{return fX1;}
Double_t GetEndX() const
{return fX2;}
Double_t GetStartY() const
{return fY1;}
Double_t GetEndY() const
{return fY2;}