TotalDepth.util.plot.Stroke (Plot Pen Stroke)

Defines how the stroke of a pen is represented on a plot.

Created on 7 Mar 2011

class TotalDepth.util.plot.Stroke.Stroke(width, colour, coding, opacity)

Stroke basic properties

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

static __new__(_cls, width, colour, coding, opacity)

Create new instance of Stroke(width, colour, coding, opacity)

__repr__()

Return a nicely formatted representation string

coding

Alias for field number 2

colour

Alias for field number 1

opacity

Alias for field number 3

width

Alias for field number 0

TotalDepth.util.plot.Stroke.StrokeBlackSolid = Stroke(width='1', colour='black', coding=None, opacity=1.0)

Prototypical black solid stroke Usage: StrokeBlackSolid._replace(width=2.0)

TotalDepth.util.plot.Stroke.retSVGAttrsFromStroke(stroke)

Returns SVG attributes as a dictionary from a Stroke() object.