Fix scrolling images within margins

This commit fixes an off-by-one error in image scrolling that caused
images to not be scrolled or to be cropped at the wrong line.
This commit is contained in:
Sergei Grechanik
2022-12-25 14:35:21 -08:00
parent 2e81d00c92
commit 32d8aac808
2 changed files with 5 additions and 5 deletions

View File

@@ -563,7 +563,7 @@ class TestGraphics(BaseTest):
self.ae(layers(s)[0]['src_rect'], {'left': 0.0, 'top': 0.0, 'right': 1.0, 'bottom': 1.0})
while s.cursor.y != 1:
s.reverse_index()
s.reverse_index()
s.reverse_index(), s.reverse_index()
self.ae(layers(s)[0]['src_rect'], {'left': 0.0, 'top': 0.0, 'right': 1.0, 'bottom': 0.5})
s.reverse_index()
self.ae(s.grman.image_count, 2)