blob: 2f993a37819cc72c8e80b450d46cad09fde8181d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
def zoom_in(zoom):
if zoom[0] > 128:
zoom = (zoom[0] / 1.5, zoom[1] / 1.5)
return zoom
def zoom_out(zoom):
if zoom[0] < 1280:
zoom = (zoom[0] * 1.5, zoom[1] * 1.5)
return zoom
def zoom_reset(zoom, offset):
zoom = (1280.0, 720.0)
offset = (0, 0)
return zoom, offset
def offset_up(offset):
offset = (offset[0], offset[1] - 10)
return offset
def offset_down(offset):
offset = (offset[0], offset[1] + 10)
return offset
def offset_left(offset):
offset = (offset[0] - 10, offset[1])
return offset
def offset_right(offset):
offset = (offset[0] + 10, offset[1])
return offset
|