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
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
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)
def setSVG (self): attr = BoxElement.setSVG (self) attr.update (GroupableElement.setSVG (self)) attr.update ([('viewBox', self.viewBox)]) return attr
def setSVG(self): attr = GroupableElement.setSVG(self) attr.update([('viewBox', self.viewBox)]) return attr
def __init__(self, **attr): GroupableElement.__init__(self, name='defs', **attr)
def __init__ (self, **attr): GroupableElement.__init__ (self, name = 'defs', **attr)
def SVG(self, indent): return GroupableElement.SVG(self, indent)