Example #1
0
 def __init__(self, command, node, canvasContext, rootTree):
     Element.__init__(self)
     self.node = node
     self.command = command
     self.canvasContext = canvasContext
     self.rootTree = rootTree
     self.gradientHelper = GradientHelper(self)
Example #2
0
 def __init__(self, command, node, canvasContext, rootTree):
     Element.__init__(self)
     self.node = node
     self.command = command
     self.canvasContext = canvasContext
     self.rootTree = rootTree
     self.gradientHelper = GradientHelper(self)
Example #3
0
class TestSvgElement(unittest.TestCase):
    def setUp(self):
        self.element = Element()
        self.effect = Effect()
        self.document = self.effect.parse(
            "TestFiles/unit_test_svg_element.svg")
        self.node = self.effect.document.getroot()

    def testAttrWithNs(self):
        self.element.node = self.node
        returnValue = self.element.attr("width", "ns")
        self.assertEqual(returnValue, "12cm")

    def testAttrWithoutNs(self):
        self.element.node = self.node
        returnValue = self.element.attr("width")
        self.assertEqual(returnValue, "12cm")
class TestSvgElement(unittest.TestCase):
    def setUp(self):
        self.element = Element()
        self.effect = Effect()
        self.document = self.effect.parse("TestFiles/unit_test_svg_element.svg")
        self.node = self.effect.document.getroot()
        
    def testAttrWithNs(self):
        self.element.node = self.node
        returnValue = self.element.attr("width", "ns")
        self.assertEqual(returnValue, "12cm")
        
        
    def testAttrWithoutNs(self):
        self.element.node = self.node
        returnValue = self.element.attr("width")
        self.assertEqual(returnValue, "12cm")
Example #5
0
 def setUp(self):
     self.element = Element()
     self.effect = Effect()
     self.document = self.effect.parse(
         "TestFiles/unit_test_svg_element.svg")
     self.node = self.effect.document.getroot()
Example #6
0
 def __init__(self, command, node, canvasContext, root):
     Element.__init__(self)
     self.command = command
     self.node = node
     self.canvasContext = canvasContext
     self.root = root
 def setUp(self):
     self.element = Element()
     self.effect = Effect()
     self.document = self.effect.parse("TestFiles/unit_test_svg_element.svg")
     self.node = self.effect.document.getroot()