Example #1
0
 def test_get_rotated_scale_from_dimensions(self):
     a = PdfAnnotator(files.ROTATED_90)
     a.set_page_dimensions((3300, 1275), 0)
     assert a.get_scale(0) == (0.24, 0.48)
Example #2
0
 def test_get_scale_from_init(self):
     a = PdfAnnotator(files.SIMPLE, scale=0.48)
     assert a.get_scale(0) == (0.48, 0.48)
Example #3
0
 def test_get_scale_from_page_dimensions(self):
     a = PdfAnnotator(files.SIMPLE)
     # Rastered at different X and Y scales. Why would you do that?
     a.set_page_dimensions((1275, 3300), 0)
     assert a.get_scale(0) == (0.48, 0.24)
Example #4
0
 def test_get_scale_default(self):
     a = PdfAnnotator(files.SIMPLE)
     assert a.get_scale(0) == (1, 1)