Beispiel #1
0
 def test_add_stop_color(self):
     rg = RadialGradient()
     rg.add_stop_color(offset=0.5, color='red', opacity=1.0)
     self.assertEqual(
         rg.tostring(),
         '<radialGradient><stop offset="0.5" stop-color="red" stop-opacity="1.0" /></radialGradient>'
     )
Beispiel #2
0
 def test_constructor(self):
     rg = RadialGradient(center=(10, 20),
                         r=10,
                         focal=(15, 25),
                         inherit='#test',
                         debug=True,
                         profile='full')
     self.assertEqual(
         rg.tostring(),
         '<radialGradient cx="10" cy="20" fx="15" fy="25" r="10" xlink:href="#test" />'
     )
Beispiel #3
0
 def test_add_stop_color(self):
     rg = RadialGradient()
     rg.add_stop_color(offset=0.5, color='red', opacity=1.0)
     self.assertEqual(rg.tostring(), '<radialGradient><stop offset="0.5" stop-color="red" stop-opacity="1.0" /></radialGradient>')
Beispiel #4
0
 def test_constructor(self):
     rg = RadialGradient(center=(10, 20), r=10, focal=(15, 25), inherit='#test', debug=True, profile='full')
     self.assertEqual(rg.tostring(),
         '<radialGradient cx="10" cy="20" fx="15" fy="25" r="10" xlink:href="#test" />')