-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | src/controller/actions/pan.c | 23 | ||||
-rw-r--r-- | src/controller/actions/set_ortho.c | 5 | ||||
-rw-r--r-- | src/controller/actions/zoom.c | 8 | ||||
-rw-r--r-- | src/controller/callbacks/keyboard.c | 2 | ||||
-rw-r--r-- | src/controller/callbacks/mouse.c | 30 | ||||
-rw-r--r-- | src/controller/callbacks/mouse_motion.c | 2 | ||||
-rw-r--r-- | src/controller/callbacks/mouse_wheel.c | 8 | ||||
-rw-r--r-- | src/controller/callbacks/reshape.c | 26 | ||||
-rw-r--r-- | src/model/geometry/map_geometry.c | 10 | ||||
-rw-r--r-- | src/model/state/pan_info_init.h | 2 | ||||
-rw-r--r-- | src/model/state/zoom_info_init.c | 2 |
12 files changed, 70 insertions, 65 deletions
diff --git a/src/controller/actions/zoom.c b/src/controller/actions/zoom.c index 7209e85..53da49b 100644 --- a/src/controller/actions/zoom.c +++ b/src/controller/actions/zoom.c | |||
@@ -14,7 +14,7 @@ void | |||
14 | zoom (double x1, double y1, double x2, double y2) | 14 | zoom (double x1, double y1, double x2, double y2) |
15 | { | 15 | { |
16 | S.zoom.active = true; | 16 | S.zoom.active = true; |
17 | 17 | ||
18 | S.zoom.coords[0] = x1; | 18 | S.zoom.coords[0] = x1; |
19 | S.zoom.coords[1] = x2; | 19 | S.zoom.coords[1] = x2; |
20 | S.zoom.coords[2] = y1; | 20 | S.zoom.coords[2] = y1; |
@@ -30,7 +30,7 @@ zoom (double x1, double y1, double x2, double y2) | |||
30 | */ | 30 | */ |
31 | double width = S.zoom.coords[1] - S.zoom.coords[0]; | 31 | double width = S.zoom.coords[1] - S.zoom.coords[0]; |
32 | double height = S.zoom.coords[3] - S.zoom.coords[2]; | 32 | double height = S.zoom.coords[3] - S.zoom.coords[2]; |
33 | double difference = fabs(width - height); | 33 | double difference = fabs (width - height); |
34 | 34 | ||
35 | if (width > height) | 35 | if (width > height) |
36 | { | 36 | { |
@@ -46,8 +46,8 @@ zoom (double x1, double y1, double x2, double y2) | |||
46 | GLint viewport[4]; | 46 | GLint viewport[4]; |
47 | glGetIntegerv (GL_VIEWPORT, viewport); | 47 | glGetIntegerv (GL_VIEWPORT, viewport); |
48 | reshape (viewport[2], viewport[3]); | 48 | reshape (viewport[2], viewport[3]); |
49 | 49 | ||
50 | glutPostRedisplay (); | 50 | glutPostRedisplay (); |
51 | 51 | ||
52 | return; | 52 | return; |
53 | } | 53 | } |