summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/controller/actions/zoom.c2
-rw-r--r--src/controller/callbacks/keyboard.c6
-rw-r--r--src/controller/callbacks/reshape.c3
-rw-r--r--src/model/geometry/density_legend_geometry.c5
-rw-r--r--src/model/state/state.h9
5 files changed, 10 insertions, 15 deletions
diff --git a/src/model/geometry/density_legend_geometry.c b/src/model/geometry/density_legend_geometry.c
index c437517..e5baa08 100644
--- a/src/model/geometry/density_legend_geometry.c
+++ b/src/model/geometry/density_legend_geometry.c
@@ -47,7 +47,10 @@ density_legend_geometry (void)
* remains a fixed number of pixels tall when the window is resized
* or zoomed.
*/
- double legend_height = (*top - *bottom) / S.viewport.h * 10.0;
+ GLint viewport[4];
+ glGetIntegerv (GL_VIEWPORT, viewport);
+
+ double legend_height = (*top - *bottom) / viewport[3] * 10.0;
a[0] = *left;
a[1] = *top;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.