summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/controller/actions/set_ortho.c13
-rw-r--r--src/controller/actions/zoom.c70
-rw-r--r--src/controller/actions/zoom.h4
-rw-r--r--src/controller/callbacks/display.c6
-rw-r--r--src/controller/callbacks/keyboard.c7
-rw-r--r--src/controller/callbacks/mouse.c49
-rw-r--r--src/controller/callbacks/mouse_wheel.c66
-rw-r--r--src/controller/callbacks/reshape.c68
-rw-r--r--src/model/geometry/density_legend_geometry.c18
-rw-r--r--src/model/state/zoom_info.h1
-rw-r--r--src/model/state/zoom_info_init.c6
11 files changed, 197 insertions, 111 deletions
diff --git a/src/controller/callbacks/keyboard.c b/src/controller/callbacks/keyboard.c
index 9967ad3..9e667d8 100644
--- a/src/controller/callbacks/keyboard.c
+++ b/src/controller/callbacks/keyboard.c
@@ -4,6 +4,7 @@
#include "reshape.h"
#include "../../view/state0.h"
#include "../../model/state/pan_info_init.h"
+#include "../../model/state/zoom_info_init.h"
#include <GL/glut.h>
#define S state0
@@ -41,11 +42,11 @@ keyboard (unsigned char key, int x, int y)
case 'r':
/*
- * Reset the view (unzoom).
+ * Reset the view (unzoom, recenter).
*/
pan_info_init (&S.pan);
- S.zoom.active = false;
-
+ zoom_info_init (&S.zoom);
+
GLint viewport[4];
glGetIntegerv (GL_VIEWPORT, viewport);
reshape (viewport[2], viewport[3]);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.