Esempio n. 1
0
 def test_subelement_tspan(self):
     txt = TextPath('#test', 'text')
     txt.add(TSpan('subtext'))
     self.assertEqual(
         txt.tostring(),
         '<textPath xlink:href="#test">text<tspan>subtext</tspan></textPath>'
     )
Esempio n. 2
0
 def test_constructor(self):
     tref = TextPath('#test',
                     'The Text',
                     startOffset=10,
                     spacing='auto',
                     method='stretch')
     self.assertEqual(tref.tostring(), '<textPath method="stretch" spacing="auto"' \
                      ' startOffset="10" xlink:href="#test">The Text</textPath>')
Esempio n. 3
0
 def test_subelement_tspan(self):
     txt = TextPath('#test', 'text')
     txt.add(TSpan('subtext'))
     self.assertEqual(txt.tostring(), '<textPath xlink:href="#test">text<tspan>subtext</tspan></textPath>')
Esempio n. 4
0
 def test_constructor(self):
     tref = TextPath('#test', 'The Text', startOffset=10, spacing='auto', method='stretch')
     self.assertEqual(tref.tostring(), '<textPath method="stretch" spacing="auto"' \
                      ' startOffset="10" xlink:href="#test">The Text</textPath>')