summaryrefslogtreecommitdiffstats
Unidiff
-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 @@
2#include "../view/exp004state0.h"2#include "../view/exp004state0.h"
3#include "../controller/exp004reshape.h"3#include "../controller/exp004reshape.h"
4#include <GL/glut.h>4#include <GL/glut.h>
5#include <stdio.h>
65
7#define S exp004state06#define S exp004state0
87
@@ -15,13 +14,6 @@ density_legend_geometry (void)
15 DEFAULT_COLOR_A);14 DEFAULT_COLOR_A);
1615
17 /*16 /*
18 * This value should be a percentage of the world height so that it
19 * remains a fixed number of pixels tall when the window is resized
20 * or zoomed.
21 */
22 double legend_height = 0.5;
23
24 /*
25 * Calculate the bounding box for the legend.17 * Calculate the bounding box for the legend.
26 */18 */
2719
@@ -33,20 +25,30 @@ density_legend_geometry (void)
33 const double *left;25 const double *left;
34 const double *right;26 const double *right;
35 const double *top;27 const double *top;
28 const double *bottom;
3629
37 if (S.zoom.active)30 if (S.zoom.active)
38 {31 {
39 left = &S.zoom.coords[0];32 left = &S.zoom.coords[0];
40 right = &S.zoom.coords[1];33 right = &S.zoom.coords[1];
34 bottom = &S.zoom.coords[2];
41 top = &S.zoom.coords[3];35 top = &S.zoom.coords[3];
42 }36 }
43 else37 else
44 {38 {
45 left = &S.ortho.min_x;39 left = &S.ortho.min_x;
46 top = &S.ortho.max_y;
47 right = &S.ortho.max_x;40 right = &S.ortho.max_x;
41 bottom = &S.ortho.min_y;
42 top = &S.ortho.max_y;
48 }43 }
4944
45 /*
46 * This value should be a percentage of the world height so that it
47 * remains a fixed number of pixels tall when the window is resized
48 * or zoomed.
49 */
50 double legend_height = (*top - *bottom) / S.viewport.h * 10.0;
51
50 a[0] = *left;52 a[0] = *left;
51 a[1] = *top;53 a[1] = *top;
52 b[0] = *right;54 b[0] = *right;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.