summaryrefslogtreecommitdiff
path: root/src/sliceitoff/display/scaling.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/display/scaling.py')
-rw-r--r--src/sliceitoff/display/scaling.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/display/scaling.py b/src/sliceitoff/display/scaling.py
index b4292b4..834c02e 100644
--- a/src/sliceitoff/display/scaling.py
+++ b/src/sliceitoff/display/scaling.py
@@ -50,7 +50,8 @@ class Scaling():
if size[0] / size[1] <= INTERNAL_WIDTH / INTERNAL_HEIGHT:
__class__.factor = size[0] / INTERNAL_WIDTH
__class__.left = 0
- __class__.top = (size[1] - INTERNAL_HEIGHT * __class__.factor) // 2
+ __class__.top = int (
+ (size[1] - INTERNAL_HEIGHT * __class__.factor) // 2)
__class__.borders = (
pygame.Rect(
0,
@@ -65,7 +66,8 @@ class Scaling():
)
else:
__class__.factor = size[1] / INTERNAL_HEIGHT
- __class__.left = (size[0] - INTERNAL_WIDTH * __class__.factor) // 2
+ __class__.left = int(
+ (size[0] - INTERNAL_WIDTH * __class__.factor) // 2)
__class__.top = 0
__class__.borders = (
pygame.Rect(