summaryrefslogtreecommitdiffstats
Unidiff
-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 @@
4#include "reshape.h"4#include "reshape.h"
5#include "../../view/state0.h"5#include "../../view/state0.h"
6#include "../../model/state/pan_info_init.h"6#include "../../model/state/pan_info_init.h"
7#include "../../model/state/zoom_info_init.h"
7#include <GL/glut.h>8#include <GL/glut.h>
89
9#define S state010#define S state0
@@ -41,11 +42,11 @@ keyboard (unsigned char key, int x, int y)
4142
42 case 'r':43 case 'r':
43 /*44 /*
44 * Reset the view (unzoom).45 * Reset the view (unzoom, recenter).
45 */46 */
46 pan_info_init (&S.pan);47 pan_info_init (&S.pan);
47 S.zoom.active = false;48 zoom_info_init (&S.zoom);
48 49
49 GLint viewport[4];50 GLint viewport[4];
50 glGetIntegerv (GL_VIEWPORT, viewport);51 glGetIntegerv (GL_VIEWPORT, viewport);
51 reshape (viewport[2], viewport[3]);52 reshape (viewport[2], viewport[3]);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.