Ejemplo n.º 1
0
 def test_analyze_rectToPath(self):
     ctm = CurrentTransformation()
     rect = {
         'x': 10,
         'y': 20,
         'width': 50,
         'height': 30
     }
     path = ctm.rectToPath(rect)
     assert_equal(path, "M 10.000000,20.000000 L 60.000000,20.000000 L 60.000000,50.000000 L 10.000000,50.000000 L 10.000000,20.000000 ")
Ejemplo n.º 2
0
    def test_analyze_rectToPath3(self):
        ctm = CurrentTransformation()

        rect = {
            'x': 10,
            'y': 10,
            'width': 40,
            'height': 40,
            'rx': 20,
            'ry': 20
        }
        path = ctm.rectToPath(rect)
        assert_equal(path, "M 30.000000,10.000000 L 30.000000,10.000000 A 20.000000,20.000000 0 0 1 50.000000,30.000000L 50.000000,30.000000 A 20.000000,20.000000 0 0 1 30.000000,50.000000L 30.000000,50.000000 A 20.000000,20.000000 0 0 1 10.000000,30.000000L 10.000000,30.000000 A 20.000000,20.000000 0 0 1 30.000000,10.000000")
Ejemplo n.º 3
0
    def test_analyze_rectToPath2(self):
        ctm = CurrentTransformation()

        rect = {
            'x': 10,
            'y': 20,
            'width': 50,
            'height': 30,
            'rx': 5,
            'ry': 10
        }
        path = ctm.rectToPath(rect)
        assert_equal(path, "M 15.000000,20.000000 L 55.000000,20.000000 A 5.000000,10.000000 0 0 1 60.000000,30.000000L 60.000000,40.000000 A 5.000000,10.000000 0 0 1 55.000000,50.000000L 15.000000,50.000000 A 5.000000,10.000000 0 0 1 10.000000,40.000000L 10.000000,30.000000 A 5.000000,10.000000 0 0 1 15.000000,20.000000")