comparison tools/svg2code.py @ 434:b5c7670b524b

Add coord for stext
author Thinker K.F. Li <thinker@branda.to>
date Wed, 29 Jul 2009 16:35:13 +0800
parents bf1addb037b7
children bb4f651090bf
comparison
equal deleted inserted replaced
433:099941c3becf 434:b5c7670b524b
657 raise NotImplementedError, \ 657 raise NotImplementedError, \
658 'gen_text should be assigned to an implementation' 658 'gen_text should be assigned to an implementation'
659 659
660 @check_mbname 660 @check_mbname
661 def translate_text(text, coord_id, codefo, doc): 661 def translate_text(text, coord_id, codefo, doc):
662 coord_id = translate_shape_transform(text, coord_id, codefo)
662 try: 663 try:
663 map = text.style_map 664 map = text.style_map
664 except: 665 except:
665 map = translate_font_style(text, codefo) 666 map = translate_font_style(text, codefo)
666 text.style_map = map 667 text.style_map = map
761 if group.hasAttribute('transform'): 762 if group.hasAttribute('transform'):
762 transform = group.getAttribute('transform') 763 transform = group.getAttribute('transform')
763 translate_transform(group_id, transform, codefo, 'COORD_') 764 translate_transform(group_id, transform, codefo, 'COORD_')
764 pass 765 pass
765 766
767 mock_sn = 0
766 translate_style(group, group_id, codefo, doc, 'GROUP_') 768 translate_style(group, group_id, codefo, doc, 'GROUP_')
767 for node in group.childNodes: 769 for node in group.childNodes:
768 if node.namespaceURI != svgns: 770 if node.namespaceURI != svgns:
769 continue 771 continue
770 if node.localName == 'g': 772 if node.localName == 'g':