-rw-r--r-- | src/controller/clear_selection.sqc | 9 | ||||
-rw-r--r-- | src/controller/exp004processhits.c | 6 | ||||
-rw-r--r-- | src/controller/keyboard.c | 10 | ||||
-rw-r--r-- | src/controller/selection_from_db.sqc | 6 | ||||
-rw-r--r-- | src/model/density_legend_geometry.c | 20 | ||||
-rw-r--r-- | src/model/exp004state.h | 7 | ||||
-rw-r--r-- | src/model/protein_geometry.c | 2 | ||||
-rw-r--r-- | src/view/exp004geometry.c | 26 | ||||
-rw-r--r-- | src/view/exp004init.c | 3 |
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> | ||
6 | 5 | ||
7 | #define S exp004state0 | 6 | #define S exp004state0 |
8 | 7 | ||
@@ -15,13 +14,6 @@ density_legend_geometry (void) | |||
15 | DEFAULT_COLOR_A); | 14 | DEFAULT_COLOR_A); |
16 | 15 | ||
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 | */ |
27 | 19 | ||
@@ -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; | ||
36 | 29 | ||
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 | else | 37 | 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 | } |
49 | 44 | ||
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; |