Esempio n. 1
0
 def __init__ (self, **attr):
     GroupableElement.__init__ (self, name = 'svg', **attr)
     BoxElement.__init__ (self, name = 'svg', **attr)
     if attr.has_key ('viewBox'):
         self.viewBox = attr['viewBox']
     else:
         self.viewBox = None
Esempio n. 2
0
 def __init__(self, **attr):
     GroupableElement.__init__(self, name='svg', **attr)
     BoxElement.__init__(self, name='svg', **attr)
     if attr.has_key('viewBox'):
         self.viewBox = attr['viewBox']
     else:
         self.viewBox = None
Esempio n. 3
0
 def SVG(self, indent):
     if self.parent is None:
         prepend = '<?xml version="1.0" standalone="no"?>\n'
         prepend += '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" '
         prepend += '"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'
         self.scripts.reverse()
         for script in self.scripts:
             self.drawAt(script, 0)
         return prepend + GroupableElement.SVG(self, indent)
     else:
         return GroupableElement.SVG(self, indent)
Esempio n. 4
0
 def setSVG (self):
     attr = BoxElement.setSVG (self)
     attr.update (GroupableElement.setSVG (self))
     attr.update ([('viewBox', self.viewBox)])
     return attr
Esempio n. 5
0
 def setSVG(self):
     attr = GroupableElement.setSVG(self)
     attr.update([('viewBox', self.viewBox)])
     return attr
Esempio n. 6
0
 def __init__(self, **attr):
     GroupableElement.__init__(self, name='defs', **attr)
Esempio n. 7
0
 def __init__ (self, **attr):
     GroupableElement.__init__ (self, name = 'defs', **attr)
Esempio n. 8
0
 def SVG(self, indent):
     return GroupableElement.SVG(self, indent)