예제 #1
0
 def exportSvg(self):
   tmplt = '''
              <g transform="translate($x,$y)">
                $arrow
                $txt
              </g>
   '''
   arrow=self.arrow.exportSvg() if self.arrow else ''
   txt = Text.exportSvg(self, NO_POS)  # The text position is the position of the group.
   d = dict(text=str(self.text.toPlainText()),
            x=self.x(), y=self.y(),
            txt=txt,
            arrow = arrow)
   xml = string.Template(tmplt).substitute(d)
   return xml