Commit 6c418ae6 authored by Tošner, Jan's avatar Tošner, Jan
Browse files

v1.11

- opraven pomer stran v zakladu
parent ddef40f6
......@@ -142,9 +142,9 @@ class Picture:
def __init__(self):
self.pos = (0, 0)
self.extend = 1
self.ratio = (1, 1)
self.surf = pygame.Surface((SCREEN_WIDTH, SCREEN_HEIGHT))
self.pic = pygame.Surface((1920, 1072))
self.ratio = ((SCREEN_WIDTH/self.pic.get_width()), (SCREEN_HEIGHT/self.pic.get_height()))
self.pic.fill(WHITE_COLOR)
self.shown = self.pic.copy()
......@@ -194,9 +194,12 @@ class Picture:
pygame.image.save(self.pic, path)
def put(self, img, cord):
x, y = cord
xp, yp = self.pos
print(cord, self.pos)
cord = (((x - xp)//(16 * self.ratio[0] * self.extend))*16, ((y - yp)//(16 * self.ratio[0] * self.extend))*16)
print(cord)
img.draw(self.pic, cord)
self.shown = self.pic.copy()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment