def test_noOffsetNoResize(self):
     info = contentRecog.RecogImageInfo(0, 0, 1000, 2000, 1)
     self.assertEqual(info.recogWidth, 1000)
     self.assertEqual(info.recogHeight, 2000)
     self.assertEqual(info.convertXToScreen(100), 100)
     self.assertEqual(info.convertYToScreen(200), 200)
     self.assertEqual(info.convertWidthToScreen(100), 100)
     self.assertEqual(info.convertHeightToScreen(200), 200)
 def test_withOffsetWithResize(self):
     info = contentRecog.RecogImageInfo(10, 20, 1000, 2000, 2)
     self.assertEqual(info.recogWidth, 2000)
     self.assertEqual(info.recogHeight, 4000)
     self.assertEqual(info.convertXToScreen(200), 110)
     self.assertEqual(info.convertYToScreen(400), 220)
     self.assertEqual(info.convertWidthToScreen(200), 100)
     self.assertEqual(info.convertHeightToScreen(400), 200)
 def setUp(self):
     info = contentRecog.RecogImageInfo(0, 0, 1000, 2000, 1)
     self.result = contentRecog.LinesWordsResult(self.DATA, info)
     self.fakeObj = FakeNVDAObject()
     self.textInfo = self.result.makeTextInfo(self.fakeObj,
                                              textInfos.POSITION_FIRST)