summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--Makefile.am17
-rw-r--r--src/controller/actions/pan.c23
-rw-r--r--src/controller/actions/set_ortho.c5
-rw-r--r--src/controller/actions/zoom.c8
-rw-r--r--src/controller/callbacks/keyboard.c2
-rw-r--r--src/controller/callbacks/mouse.c30
-rw-r--r--src/controller/callbacks/mouse_motion.c2
-rw-r--r--src/controller/callbacks/mouse_wheel.c8
-rw-r--r--src/controller/callbacks/reshape.c26
-rw-r--r--src/model/geometry/map_geometry.c10
-rw-r--r--src/model/state/pan_info_init.h2
-rw-r--r--src/model/state/zoom_info_init.c2
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
14zoom (double x1, double y1, double x2, double y2)14zoom (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);
3434
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}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.