pyfeyn2.render.pyx.blobs

Various blob shapes to represent generic interactions.

Module Contents

Classes

Blob

Base class for all blob-like objects in Feynman diagrams

Circle

A circular blob

Ellipse

An elliptical blob

Attributes

NamedBlob

class pyfeyn2.render.pyx.blobs.Blob(x, y, trafos=[], points=[], fill=[], stroke=[], blob=None, labels=[], **kwargs)[source]

Bases: pyfeyn2.render.pyx.points.Point, pyfeyn2.render.pyx.utils.Visible

Base class for all blob-like objects in Feynman diagrams

Constructor.

setStrokeStyle(strokestyle)[source]

Set the stroke style.

clearStrokeStyles()[source]

Remove all the current stroke styles.

setFillStyle(fillstyle)[source]

Set the fill style.

clearFillStyles()[source]

Remove all the current fill styles.

addTrafo(trafo)[source]

Add a transformation.

clearTrafos()[source]

Remove transformations.

setPoints(points)[source]

Set the points to which this blob is attached.

addLabel(text, displace=-0.15, angle=0, size=pyx.text.size.normalsize, halign=CENTER, valign=None)[source]

Add a label.

clearLabels()[source]

Remove all current labels.

class pyfeyn2.render.pyx.blobs.Circle(x=None, y=None, center=None, radius=None, fill=[WHITE], stroke=[BLACK], points=[], blob=None, labels=[], **kwargs)[source]

Bases: Blob

A circular blob

Constructor.

blobshape = circle[source]
getPath()[source]

Get the path of this circle blob.

draw(canvas)[source]

Draw this circle blob.

class pyfeyn2.render.pyx.blobs.Ellipse(x=None, y=None, center=None, xradius=None, yradius=None, fill=[WHITE], stroke=[BLACK], trafos=[], points=[], blob=None, labels=[], **kwargs)[source]

Bases: Blob

An elliptical blob

Constructor.

blobshape = ellipse[source]
getXRadius()[source]

Get the component of the radius in the x-direction.

setXRadius(xrad)[source]

Set the component of the radius in the x-direction.

getYRadius()[source]

Get the component of the radius in the y-direction.

setYRadius(yrad)[source]

Set the component of the radius in the y-direction.

getXYRadius()[source]

Get the components of the radius in the x and y directions at the same time.

setXYRadius(xrad, yrad)[source]

Get the components of the radius in the x and y directions at the same time.

getPath()[source]

Get the path for this blob.

draw(canvas)[source]

Draw this blob on the given canvas.

pyfeyn2.render.pyx.blobs.NamedBlob[source]