ROOT » GRAF2D » GRAF » TCurlyLine

class TCurlyLine: public TPolyLine, public TAttBBox2D

 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)

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_tGetAmplitude() const
virtual Rectangle_tGetBBox()
virtual TPointGetBBoxCenter()
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
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 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
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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)
TCurlyLine&operator=(const TCurlyLine&)
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 voidSetAmplitude(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 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::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 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) const
virtual Int_tTPolyLine::Size() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
TCurlyLine(const TCurlyLine&)
TCurlyLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t wl = 0.02, Double_t amp = 0.01)
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
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TPolyLine::(anonymous)TPolyLine::kPolyLineNDC
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
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)
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

 Default constructor.
TCurlyLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t wl = 0.02, Double_t amp = 0.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".
Rectangle_t GetBBox()
 Return the bounding Box of the CurlyLine
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)
virtual ~TCurlyLine()
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;}