Пример #1
0
 def testConstructorArgs(self):
     m = "buffer"
     s = (400, 500)
     v = (0, 0, 30, 40)
     c = evas.Canvas(method=m, size=s, viewport=v)
     c.engine_info_set(c.engine_info_get())
     self.assertEqual(c.output_method_get(), evas.render_method_lookup(m))
     self.assertEqual(c.size_get(), s)
     self.assertEqual(c.viewport_get(), v)
     self.assertEqual(isinstance(str(c), str), True)
     self.assertEqual(isinstance(repr(c), str), True)
Пример #2
0
 def setUp(self):
     self.canvas = evas.Canvas(method="buffer",
                               size=(400, 500),
                               viewport=(0, 0, 400, 500))
     self.canvas.engine_info_set(self.canvas.engine_info_get())
Пример #3
0
 def testNoConstructorArgs(self):
     c = evas.Canvas()
     self.assertEqual(c.output_method_get(), 0)
     self.assertEqual(c.size_get(), (0, 0))
     self.assertEqual(c.viewport_get(), (0, 0, 1, 1))
Пример #4
0
 def setUp(self):
     self.canvas = evas.Canvas(method="buffer",
                               size=(400, 500),
                               viewport=(0, 0, 400, 500))
     self.canvas.engine_info_set(self.canvas.engine_info_get())
     self.obj = evas.Rectangle(self.canvas, geometry=(10, 20, 30, 40))