Exemple #1
0
    def __init__(self, name='right-arrow', width=5):
        self.width = width

        BaseElement.__init__(self, 'marker')
        self._attributes['id'] = name
        self._attributes['viewBox'] = '0 0 20 20'
        self._attributes['refX'] = '0'
        self._attributes['refY'] = '10'
        self._attributes['orient'] = 'auto'
        self._attributes['markerUnits'] = 'strokeWidth'
        self._attributes['markerWidth'] = width
        self._attributes['markerHeight'] = 2 * width
        self.addElement(path("M 0 0 L 20 10 L 0 20 z"))
Exemple #2
0
    def __init__(self, id, refX = "10", refY = "12.5", markerWidth = "9", markerHeight = "30", markerUnits = "strokeWidth", orient = "auto"):
        BaseElement.__init__(self, 'marker');

        self.setAttribute("id", id);
        self.setAttribute("viewBox", "0 0 30 30");
        self.setAttribute("refX", refX);
        self.setAttribute("refY", refY);
        self.setAttribute("markerUnits", markerUnits);
        self.setAttribute("markerWidth", markerWidth);
        self.setAttribute("markerHeight", markerHeight);
        self.setAttribute("orient", orient);

        self.addElement(Path("M0.3125 0.625 9.3125 12.625 0.3125 24.625 21.3125 12.625 Z"));
Exemple #3
0
def cap_def(name, children):
    d = defs()
    m = BaseElement('marker')
    m.setAttribute('id', name)
    m.setAttribute('orient', 'auto')
    #m.setAttribute('markerUnits', 'strokeWidth')
    d.addElement(m)
    for c in children:
        m.addElement(c)
    return d
def cap_def(name, children):
    d = defs()
    m = BaseElement('marker')
    m.setAttribute('id', name)
    m.setAttribute('orient', 'auto')
    #m.setAttribute('markerUnits', 'strokeWidth')
    d.addElement(m)
    for c in children:
        m.addElement(c)
    return d
Exemple #5
0
 def __init__(self, **kwargs):
     BaseElement.__init__(self, 'mpath')
     self.setKWARGS(**kwargs)
Exemple #6
0
 def __init__(self, **kwargs):
     BaseElement.__init__(self, 'animateColor')
     self.setKWARGS(**kwargs)
Exemple #7
0
 def __init__(self, **kwargs):
     BaseElement.__init__(self, 'animateTransform')
     self.setKWARGS(**kwargs)
Exemple #8
0
    def __init__(self, d):
        BaseElement.__init__(self, 'path');

        self.setAttribute("style", "stroke-width:1;stroke:black;fill:black;opacity:1");
        self.setAttribute("d", d);