PSVG.Draw package
Submodules
PSVG.Draw.Base module
- class PSVG.Draw.Base.Base(name, fill=None, fill_opacity=None, stroke=None, stroke_width=None, stroke_opacity=None, stroke_dasharray=None, active=True)
Bases:
Node
Abstract Class
Sets the parameters shared by all drawn objects.
Currently, these are as follows: - fill: an (r, g, b) tuple that sets the fill color of the object - fill_opacity: a float value between 0 and 1 that sets the opacity of the object - stroke: an (r, g, b) tuple that sets the color of the object border - stroke_opacity: a float value between 0 and 1 that sets the opacity of the object border - stroke_width: a float that sets the width of the object border - stroke_dasharray: a list of integers that sets the design of the object border dashes if desired
Any parameter not set will be absent from the svg definition.
- construct(depth)
Constructs the svg definition :param depth: current depth of this node in the svg tree :return: String containing the svg definition for this object