From a7524180652526062e2c771ab6a44c416f128adc Mon Sep 17 00:00:00 2001 From: tanek liang Date: Sun, 12 Nov 2017 22:05:26 +0800 Subject: [PATCH] [gui] fix rtgui_dc_end_drawing() too few arguments in function call --- bsp/efm32/application.c | 2 +- bsp/mb9bf500r/info.c | 8 ++++---- bsp/stm32f429-apollo/applications/rtgui_demo.c | 2 +- bsp/stm32f429_armfly/applications/rtgui_demo.c | 2 +- examples/module/tetris/tetris_ui.c | 2 +- examples/module/tetris/tetris_view.c | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bsp/efm32/application.c b/bsp/efm32/application.c index 841ee48432..d3bab9eabe 100644 --- a/bsp/efm32/application.c +++ b/bsp/efm32/application.c @@ -148,7 +148,7 @@ static rt_bool_t pic_view_event_handler(rtgui_object_t *object, rtgui_event_t *e rt_kprintf("APP err: no image found!\n"); } - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } return result; diff --git a/bsp/mb9bf500r/info.c b/bsp/mb9bf500r/info.c index 3d8c165cff..6e76c95e59 100644 --- a/bsp/mb9bf500r/info.c +++ b/bsp/mb9bf500r/info.c @@ -42,7 +42,7 @@ static rt_bool_t view_event_handler(struct rtgui_widget* widget, struct rtgui_ev rtgui_dc_draw_text(dc, " FM3 Easy Kit Demo", &rect); rect.y1 += 10; rtgui_dc_draw_text(dc, " rt-thread / RTGUI", &rect); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); return RT_FALSE; } @@ -81,7 +81,7 @@ static rt_bool_t view_event_handler(struct rtgui_widget* widget, struct rtgui_ev rect.y2 = 10; rtgui_dc_fill_rect(dc, &rect); rtgui_dc_draw_text(dc, key_str, &rect); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } else if (ekbd->type == RTGUI_KEYUP) { @@ -94,7 +94,7 @@ static rt_bool_t view_event_handler(struct rtgui_widget* widget, struct rtgui_ev rect.y2 = 10; rtgui_dc_fill_rect(dc, &rect); //rtgui_dc_draw_text(dc, key_str, &rect); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } } else if (event->type == RTGUI_EVENT_COMMAND) @@ -144,7 +144,7 @@ static rt_bool_t view_event_handler(struct rtgui_widget* widget, struct rtgui_ev rtgui_dc_draw_vline(dc, index, rect.y2-major, rect.y2); break; } - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } return rtgui_view_event_handler(widget, event); diff --git a/bsp/stm32f429-apollo/applications/rtgui_demo.c b/bsp/stm32f429-apollo/applications/rtgui_demo.c index b75e73c7d9..1a6d2ca7c5 100644 --- a/bsp/stm32f429-apollo/applications/rtgui_demo.c +++ b/bsp/stm32f429-apollo/applications/rtgui_demo.c @@ -108,7 +108,7 @@ rt_bool_t dc_event_handler(struct rtgui_object *object, rtgui_event_t *event) rtgui_dc_draw_text_stroke(dc, __TIME__, &rect, HIGH_LIGHT, BLACK); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } return RT_FALSE; } diff --git a/bsp/stm32f429_armfly/applications/rtgui_demo.c b/bsp/stm32f429_armfly/applications/rtgui_demo.c index 7c62cffc9e..73888b152f 100644 --- a/bsp/stm32f429_armfly/applications/rtgui_demo.c +++ b/bsp/stm32f429_armfly/applications/rtgui_demo.c @@ -106,7 +106,7 @@ rt_bool_t dc_event_handler(struct rtgui_object *object, rtgui_event_t *event) rtgui_dc_draw_text_stroke(dc, __DATE__"--"__TIME__, &rect, HIGH_LIGHT, BLUE); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); } return RT_FALSE; } diff --git a/examples/module/tetris/tetris_ui.c b/examples/module/tetris/tetris_ui.c index f5b64ab9fa..311cb80f5b 100644 --- a/examples/module/tetris/tetris_ui.c +++ b/examples/module/tetris/tetris_ui.c @@ -72,7 +72,7 @@ static rt_bool_t game_view_event_handler(struct rtgui_widget* widget, struct rtg rect.y1 += 22; rect.y2 = rect.y1 + 16; rtgui_dc_draw_text(dc, "score", &rect); - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); /* start tetris game, removed later */ rt_tetris_start(g_app_info.tetris); diff --git a/examples/module/tetris/tetris_view.c b/examples/module/tetris/tetris_view.c index 722a4d315c..b9d0dc47b4 100644 --- a/examples/module/tetris/tetris_view.c +++ b/examples/module/tetris/tetris_view.c @@ -95,7 +95,7 @@ static rt_err_t _rt_tetris_view_update_next_brick(rt_tetris_view_t* thiz, rt_tet rtgui_dc_fill_rect(dc, &rect); } - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); return RT_EOK; } @@ -125,7 +125,7 @@ static rt_err_t _rt_tetris_view_update_level(rt_tetris_view_t* thiz, rt_tetris_t rtgui_dc_draw_text(dc, text, &rect); /* Redraw panel */ - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); return RT_EOK; } @@ -163,7 +163,7 @@ static rt_err_t _rt_tetris_view_update_score_and_lines(rt_tetris_view_t* thiz, r rtgui_dc_draw_text(dc, text, &rect); /* Redraw panel */ - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); return RT_EOK; } @@ -211,7 +211,7 @@ static rt_err_t _rt_tetris_view_update(rt_tetris_view_t* thiz, rt_tetris_t* tetr } /* Redraw panel */ - rtgui_dc_end_drawing(dc); + rtgui_dc_end_drawing(dc, RT_TRUE); return RT_EOK; }