Пример #1
0
 def _textual(self, node):
     rc1 = utils._process_text(self, node.text or '')
     for n in utils._child_get(node, self):
         txt_n = copy.deepcopy(n)
         for key in txt_n.attrib.keys():
             if key in ('rml_except', 'rml_loop', 'rml_tag'):
                 del txt_n.attrib[key]
         if not n.tag == 'bullet':
             txt_n.text = utils.xml2str(self._textual(n))
         txt_n.tail = n.tail and utils.xml2str(
             utils._process_text(self, n.tail.replace('\n', ''))) or ''
         rc1 += etree.tostring(txt_n)
     return rc1
Пример #2
0
 def _drawRightString(self, node):
     v = utils.attr_get(node, ['x', 'y'])
     text = self._textual(node, **v)
     text = utils.xml2str(text)
     self.canvas.drawRightString(text=text, **v)