Example #1
0
 def test_zoom1_neg(self):
     topLeft = [-256, -512]
     size = [256, 512]
     a, b = tileMap.setBounding(size, topLeft, 1)
     self.assertEqual(a, [512, -256], "a")
     self.assertEqual(b, [256, -128], "b")
Example #2
0
 def test_zoom1_pos(self):
     topLeft = [256, 512]
     size = [256, 512]
     a, b = tileMap.setBounding(size, topLeft, 1)
     self.assertEqual(a, [-512, 256], "a")
     self.assertEqual(b, [-768, 384], "b")
Example #3
0
 def test_zoomZero_pos(self):
     topLeft = [1024, 2048]
     size = [256, 512]
     a, b = tileMap.setBounding(size, topLeft, 0)
     self.assertEqual(a, [-2048, 1024], "a")
     self.assertEqual(b, [-2560, 1280], "b")
Example #4
0
 def test_zoom1_zero(self):
     topLeft = [0, 0]
     size = [256, 512]
     a, b = tileMap.setBounding(size, topLeft, 1)
     self.assertEqual(a, [0, 0], "a")
     self.assertEqual(b, [-256, 128], "b")
Example #5
0
 def test_zoomZero_zero(self):
     topLeft = [0, 0]
     size = [256, 512]
     a, b = tileMap.setBounding(size, topLeft, 0)
     self.assertEqual(a, [0, 0], "a")
     self.assertEqual(b, [-512, 256], "b")