示例#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
示例#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
示例#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)
示例#4
0
 def setSVG (self):
     attr = BoxElement.setSVG (self)
     attr.update (GroupableElement.setSVG (self))
     attr.update ([('viewBox', self.viewBox)])
     return attr
示例#5
0
 def setSVG(self):
     attr = GroupableElement.setSVG(self)
     attr.update([('viewBox', self.viewBox)])
     return attr
示例#6
0
 def __init__(self, **attr):
     GroupableElement.__init__(self, name='defs', **attr)
示例#7
0
文件: defs.py 项目: Koperj/SahanaEden
 def __init__ (self, **attr):
     GroupableElement.__init__ (self, name = 'defs', **attr)
示例#8
0
 def SVG(self, indent):
     return GroupableElement.SVG(self, indent)