-rw-r--r-- | src/controller/actions/set_ortho.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/controller/actions/set_ortho.c b/src/controller/actions/set_ortho.c new file mode 100644 index 0000000..83b42f4 --- a/dev/null +++ b/src/controller/actions/set_ortho.c @@ -0,0 +1,21 @@ +#include "set_ortho.h" +#include "../../view/exp004state0.h" +#include <GL/glut.h> + +#define S exp004state0 + +void +set_ortho (void) +{ + if (S.zoom.active) + { + gluOrtho2D (S.zoom.coords[0], + S.zoom.coords[1], S.zoom.coords[2], S.zoom.coords[3]); + } + else + { + gluOrtho2D (S.ortho.min_x, S.ortho.max_x, S.ortho.min_y, S.ortho.max_y); + } + + return; +} |