pyfeyn is hosted by Hepforge, IPPP Durham

Package pyfeyn :: Module lines :: Class Line
[hide private]
[frames] | no frames]

Class Line




Base class for all objects which connect points in Feynman diagrams

Instance Methods [hide private]
  __init__(self, point1, point2)
  addLabel(self, text, pos=0.5, displace=-0.25, angle=0)
Add a LaTeX label to this line, either via parameters or actually as a TeXLable object.
  addParallelArrow(self, pos=0.5, displace=0.3, length=0.5*pyx.unit.v_cm, size=6*pyx.unit.v_pt, angle=45, constriction=0.8, sense=+1)
  removeLabels(self)
Remove the labels from this line.
  fracpoint(self, frac)
Get a new Point representing the point at the given fraction along the fundamental line (i.e.
  setArrows(self, arrows)
Define the arrows on this line.
  addArrow(self, position=0.53, arrow=None)
Add an arrow to the line at the specified position, which is a number between 0 and 1, representing the fraction along the line at which the arrow should be placed.
  removeArrows(self)
Remove all arrows from this line.
  arcThru(self, arcpoint=None, x=None, y=None)
Set the point through which this line will arc.
  straighten(self)
Make this line a straight line between start and end.
  bend(self, amount)
Bend the line to the right by a given distance.
  set3D(self, choice)
Make this line display in '3D'.
  getStyles(self, stylelist)
Get the styles associated with this line.
  setStyles(self, stylelist)
Set the styles associated with this line.
  addStyle(self, style)
Add a style to this line.
  addStyles(self, stylelist)
Add some styles to this line.
  getPath(self)
Get the path taken by this line.
  getVisiblePath(self)
Find the subpath between the endpoints which isn't overshadowed by a blob of some kind
  draw(self, canvas)
Drwa this line on the given canvas.

Inherited from utils.Visible: __cmp__, getDepth, isVisible, setDepth


Method Details [hide private]

__init__(self, point1, point2)
(Constructor)

 
None

addLabel(self, text, pos=0.5, displace=-0.25, angle=0)

 
Add a LaTeX label to this line, either via parameters or actually as a TeXLable object.

addParallelArrow(self, pos=0.5, displace=0.3, length=0.5*pyx.unit.v_cm, size=6*pyx.unit.v_pt, angle=45, constriction=0.8, sense=+1)

 
None

removeLabels(self)

 
Remove the labels from this line.

fracpoint(self, frac)

 
Get a new Point representing the point at the given fraction along the fundamental line (i.e. no truncation or deformation). TODO: Handle units properly.

setArrows(self, arrows)

 
Define the arrows on this line.

addArrow(self, position=0.53, arrow=None)

 
Add an arrow to the line at the specified position, which is a number between 0 and 1, representing the fraction along the line at which the arrow should be placed. The default arrow style can be overridden by explicitly supplying an arrow object as the 'arrow' argument, in which case the position argument will be ignored.

removeArrows(self)

 
Remove all arrows from this line.

arcThru(self, arcpoint=None, x=None, y=None)

 
Set the point through which this line will arc. Either pass a Point or set x, y as floats.

straighten(self)

 
Make this line a straight line between start and end.

bend(self, amount)

 
Bend the line to the right by a given distance.

set3D(self, choice)

 
Make this line display in '3D'.

getStyles(self, stylelist)

 
Get the styles associated with this line.

setStyles(self, stylelist)

 
Set the styles associated with this line.

addStyle(self, style)

 
Add a style to this line.

addStyles(self, stylelist)

 
Add some styles to this line.

getPath(self)

 
Get the path taken by this line.
Overrides: utils.Visible.getPath

getVisiblePath(self)

 
Find the subpath between the endpoints which isn't overshadowed by a blob of some kind
Overrides: utils.Visible.getVisiblePath

draw(self, canvas)

 
Drwa this line on the given canvas.