Example #1
0
 def test_add_subelement(self):
     clip_path = ClipPath(debug=True, profile="full")
     clip_path.add(Circle((50, 60), 70))
     self.assertEqual(clip_path.tostring(), '<clipPath><circle cx="50" cy="60" r="70" /></clipPath>')
Example #2
0
 def test_transform(self):
     clip_path = ClipPath(debug=True, profile="full")
     clip_path.translate(10, 20)
     self.assertEqual(clip_path.tostring(), '<clipPath transform="translate(10,20)" />')
Example #3
0
 def test_constructor(self):
     clip_path = ClipPath(debug=True, profile="full")
     self.assertEqual(clip_path.tostring(), "<clipPath />")
Example #4
0
 def test_add_subelement(self):
     clip_path = ClipPath(debug=True, profile='full')
     clip_path.add(Circle((50,60), 70))
     self.assertEqual(clip_path.tostring(), '<clipPath><circle cx="50" cy="60" r="70" /></clipPath>')
Example #5
0
 def test_transform(self):
     clip_path = ClipPath(debug=True, profile='full')
     clip_path.translate(10, 20)
     self.assertEqual(clip_path.tostring(), '<clipPath transform="translate(10,20)" />')
Example #6
0
 def test_constructor(self):
     clip_path = ClipPath(debug=True, profile='full')
     self.assertEqual(clip_path.tostring(), '<clipPath />')