示例#1
0
 def test_set_geo_transform(self):
     self.assertEqual(self.cr.clip_extents(), (0.0, 0.0, 640.0, 480.0))
     set_geo_transform(self.cr, 49, 51, 2, 1, 640, 480)
     self.assertEqual(self.cr.clip_extents(), (49.0, 1.0, 51.0, 2.0))
     renderer = RendererBase()
     renderer.render_callable(self.cr)()
     output_surface(self.surface, "geo_transform")
     self.assertEqual(surface_hash(self.surface), 3127943)
示例#2
0
 def test_render(self):
     renderer = RendererBase()
     renderer.render_callable(self.cr)()
     output_surface(self.surface, "renderer_base")
     self.assertEqual(surface_hash(self.surface), 2986593)