summaryrefslogtreecommitdiff
path: root/src/sliceitoff/images/images.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-16 12:35:07 +0200
committerViljami Ilola <+@hix.fi>2024-03-16 12:35:07 +0200
commita23b6647b0ca2cd9f2ccbbe12360c3fa0f96a554 (patch)
treebab154622f9767fd340278ab275babb76fc569d5 /src/sliceitoff/images/images.py
parent1ad8357f0039292b929e66cf703b4314660aded2 (diff)
scaling as class
Diffstat (limited to 'src/sliceitoff/images/images.py')
-rw-r--r--src/sliceitoff/images/images.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/images/images.py b/src/sliceitoff/images/images.py
index 102ca0f..b2d93a2 100644
--- a/src/sliceitoff/images/images.py
+++ b/src/sliceitoff/images/images.py
@@ -1,11 +1,13 @@
import os
import pygame
+from display import Scaling
+
DEBUG = os.getenv("DEBUG")
images = {}
-def load_images(scale):
+def load_images():
if not images:
with open("assets/images.lst") as image_list_file:
for line in image_list_file:
@@ -16,4 +18,4 @@ def load_images(scale):
image = pygame.image.load(filename)
images[name] = pygame.transform.smoothscale_by(
pygame.Surface.convert_alpha(image),
- scale)
+ Scaling.factor)