summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.c2
-rw-r--r--src/gui/window.c15
2 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/gui.c b/src/gui/gui.c
index bf73bdb..16e9a19 100644
--- a/src/gui/gui.c
+++ b/src/gui/gui.c
@@ -104,7 +104,7 @@ void gui_handle_event(GUI *gui) {
104 mode = WAITING_BUTTON_SHOW; 104 mode = WAITING_BUTTON_SHOW;
105 break; 105 break;
106 case RENDERING: 106 case RENDERING:
107 window_rendering(gui->window, gui->pictureFrame1, gui->canvasSrc, gui->canvasTrg, gui->morphing); 107 window_rendering(gui->window, *(gui->pictureFrame1), gui->canvasSrc, gui->canvasTrg, gui->morphing);
108 break; 108 break;
109 case INSERT_TARGET: 109 case INSERT_TARGET:
110 if (keyboardButton == MLV_KEYBOARD_ESCAPE) { 110 if (keyboardButton == MLV_KEYBOARD_ESCAPE) {
diff --git a/src/gui/window.c b/src/gui/window.c
index e4eacea..a0c97a8 100644
--- a/src/gui/window.c
+++ b/src/gui/window.c
@@ -1,6 +1,7 @@
1#include "gui/window.h" 1#include "gui/window.h"
2#include <assert.h> 2#include <assert.h>
3#include <MLV/MLV_all.h> 3#include <MLV/MLV_all.h>
4#include <gui/pictureframe.h>
4#include "painter/rasterizer.h" 5#include "painter/rasterizer.h"
5#include "common/mem.h" 6#include "common/mem.h"
6 7
@@ -69,16 +70,18 @@ void window_click_keyboard_handler(Window *window, MLV_Keyboard_button *keyboard
69 group_click_handler(*mouse_x, *mouse_y, &(window->group_pictureframe->component)); 70 group_click_handler(*mouse_x, *mouse_y, &(window->group_pictureframe->component));
70} 71}
71 72
72void window_rendering(Window *window, PictureFrame *pictureFrame1, Canvas *canvasSrc, Canvas *canvasTarget, 73void window_rendering(Window *window, PictureFrame pictureFrame1, Canvas *canvasSrc, Canvas *canvasTarget,
73 Morphing *morphing) { 74 Morphing *morphing) {
74 int i; 75 int i;
75 window_print_pictureframes(window); 76 window_print_pictureframes(window);
76 for (i = 1; i <= frame; ++i) { 77 for (i = 1; i <= frame; ++i) {
77 pictureFrame1->canvas = rasterize(canvasSrc, canvasTarget, morphing, (TimeVector) (i / (float) frame)); 78 pictureFrame1.canvas = rasterize(canvasSrc, canvasTarget, morphing, (TimeVector) (i / (float) frame));
78 pictureframe_draw_canvas(pictureFrame1); 79 pictureframe_draw_canvas(&pictureFrame1);
79 MLV_actualise_window(); 80 MLV_actualise_window();
80 canvas_destroy(pictureFrame1->canvas); 81 canvas_destroy(pictureFrame1.canvas);
82 MLV_wait_milliseconds(16);
81 } 83 }
82 mode = EXITING; 84 mode = WAITING_BUTTON_SHOW;
83 MLV_wait_seconds(15); 85 window_print_pictureframes(window);
86 MLV_actualise_window();
84} 87}