Exemplo n.º 1
0
 def d_path(self):
     a = list()
     a.append(['M ', [self.x, self.y]])
     a.append([' l ', [self.width, 0]])
     a.append([' l ', [0, self.height]])
     a.append([' l ', [-self.width, 0]])
     a.append([' Z', []])
     return simplepath.formatPath(a)
Exemplo n.º 2
0
Arquivo: svg.py Projeto: HughP/svg2g
    def __init__(self, node, node_transform):
        newpath = self.new_path_from_node(node)

        x1 = float(node.get('x1'))
        y1 = float(node.get('y1'))
        x2 = float(node.get('x2'))
        y2 = float(node.get('y2'))

        a = []
        a.append(['M ', [x1, y1]])
        a.append([' L ', [x2, y2]])

        newpath.set('d', simplepath.formatPath(a))
        
        SvgPath.__init__(self, newpath, node_transform)
Exemplo n.º 3
0
    def __init__(self, node, node_transform):
        newpath = self.new_path_from_node(node)

        x1 = float(node.get('x1'))
        y1 = float(node.get('y1'))
        x2 = float(node.get('x2'))
        y2 = float(node.get('y2'))

        a = []
        a.append(['M ', [x1, y1]])
        a.append([' L ', [x2, y2]])

        newpath.set('d', simplepath.formatPath(a))

        SvgPath.__init__(self, newpath, node_transform)
Exemplo n.º 4
0
Arquivo: svg.py Projeto: HughP/svg2g
    def __init__(self, node, node_transform):
        newpath = self.new_path_from_node(node)

        x = float(node.get('x'))
        y = float(node.get('y'))
        w = float(node.get('width'))
        h = float(node.get('height'))

        a = []
        a.append(['M ', [x, y]])
        a.append([' l ', [w, 0]])
        a.append([' l ', [0, h]])
        a.append([' l ', [-w, 0]])
        a.append([' Z', []])

        newpath.set('d', simplepath.formatPath(a))
        
        SvgPath.__init__(self, newpath, node_transform)
Exemplo n.º 5
0
    def __init__(self, node, node_transform):
        newpath = self.new_path_from_node(node)

        x = float(node.get('x'))
        y = float(node.get('y'))
        w = float(node.get('width'))
        h = float(node.get('height'))

        a = []
        a.append(['M ', [x, y]])
        a.append([' l ', [w, 0]])
        a.append([' l ', [0, h]])
        a.append([' l ', [-w, 0]])
        a.append([' Z', []])

        newpath.set('d', simplepath.formatPath(a))

        SvgPath.__init__(self, newpath, node_transform)
Exemplo n.º 6
0
def formatPath(p):
    return simplepath.formatPath(unCubicSuperPath(p))
Exemplo n.º 7
0
 def d_path(self):
     a = []
     a.append(['M ', [self.x1, self.y1]])
     a.append(['L ', [self.x2, self.y2]])
     return simplepath.formatPath(a)