summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/controller/clear_selection.sqc9
-rw-r--r--src/controller/exp004processhits.c6
-rw-r--r--src/controller/keyboard.c10
-rw-r--r--src/controller/selection_from_db.sqc6
-rw-r--r--src/model/density_legend_geometry.c20
-rw-r--r--src/model/exp004state.h7
-rw-r--r--src/model/protein_geometry.c2
-rw-r--r--src/view/exp004geometry.c26
-rw-r--r--src/view/exp004init.c3
9 files changed, 59 insertions, 30 deletions
diff --git a/src/model/density_legend_geometry.c b/src/model/density_legend_geometry.c
index ab3e46c..7e30de8 100644
--- a/src/model/density_legend_geometry.c
+++ b/src/model/density_legend_geometry.c
@@ -2,7 +2,6 @@
#include "../view/exp004state0.h"
#include "../controller/exp004reshape.h"
#include <GL/glut.h>
-#include <stdio.h>
#define S exp004state0
@@ -15,13 +14,6 @@ density_legend_geometry (void)
DEFAULT_COLOR_A);
/*
- * This value should be a percentage of the world height so that it
- * remains a fixed number of pixels tall when the window is resized
- * or zoomed.
- */
- double legend_height = 0.5;
-
- /*
* Calculate the bounding box for the legend.
*/
@@ -33,20 +25,30 @@ density_legend_geometry (void)
const double *left;
const double *right;
const double *top;
+ const double *bottom;
if (S.zoom.active)
{
left = &S.zoom.coords[0];
right = &S.zoom.coords[1];
+ bottom = &S.zoom.coords[2];
top = &S.zoom.coords[3];
}
else
{
left = &S.ortho.min_x;
- top = &S.ortho.max_y;
right = &S.ortho.max_x;
+ bottom = &S.ortho.min_y;
+ top = &S.ortho.max_y;
}
+ /*
+ * This value should be a percentage of the world height so that it
+ * remains a fixed number of pixels tall when the window is resized
+ * or zoomed.
+ */
+ double legend_height = (*top - *bottom) / S.viewport.h * 10.0;
+
a[0] = *left;
a[1] = *top;
b[0] = *right;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.