-rw-r--r-- | r/connect.R | 2 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/controller/exp004reshape.c | 11 | ||||
-rw-r--r-- | src/model/density_legend_geometry.c | 81 | ||||
-rw-r--r-- | src/model/density_legend_geometry.h | 9 | ||||
-rw-r--r-- | src/model/display_list_index.h | 6 | ||||
-rw-r--r-- | src/model/exp004state.h | 14 | ||||
-rw-r--r-- | src/util/check_error.c | 6 | ||||
-rw-r--r-- | src/view/exp004geometry.c | 7 | ||||
-rw-r--r-- | src/view/exp004init.c | 8 | ||||
-rw-r--r-- | src/view/exp004view.c | 4 |
11 files changed, 124 insertions, 27 deletions
diff --git a/src/controller/exp004reshape.c b/src/controller/exp004reshape.c index 82f134d..891de08 100644 --- a/src/controller/exp004reshape.c +++ b/src/controller/exp004reshape.c @@ -1,6 +1,7 @@ #include "exp004reshape.h" #include "set_ortho.h" #include "../view/exp004state0.h" +#include "../model/density_legend_geometry.h" #include <GL/glut.h> #define S exp004state0 @@ -22,13 +23,13 @@ exp004reshape (int w, int h) { S.ortho.min_x = S.ortho_min; S.ortho.max_x = S.ortho_max; - S.ortho.min_y = S.ortho_min * (GLfloat) h / (GLfloat) w; - S.ortho.max_y = S.ortho_max * (GLfloat) h / (GLfloat) w; + S.ortho.min_y = S.ortho_min * (double) h / (double) w; + S.ortho.max_y = S.ortho_max * (double) h / (double) w; } else { - S.ortho.min_x = S.ortho_min * (GLfloat) w / (GLfloat) h; - S.ortho.max_x = S.ortho_max * (GLfloat) w / (GLfloat) h; + S.ortho.min_x = S.ortho_min * (double) w / (double) h; + S.ortho.max_x = S.ortho_max * (double) w / (double) h; S.ortho.min_y = S.ortho_min; S.ortho.max_y = S.ortho_max; } @@ -43,5 +44,7 @@ exp004reshape (int w, int h) S.viewport.w = w; S.viewport.h = h; + density_legend_geometry (); + return; } |