[gui] fix rtgui_dc_end_drawing() too few arguments in function call

This commit is contained in:
tanek liang 2017-11-12 22:05:26 +08:00 committed by Bernard Xiong
parent d12ea8eb49
commit a752418065
6 changed files with 12 additions and 12 deletions

View File

@ -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"); rt_kprintf("APP err: no image found!\n");
} }
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
} }
return result; return result;

View File

@ -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); rtgui_dc_draw_text(dc, " FM3 Easy Kit Demo", &rect);
rect.y1 += 10; rect.y1 += 10;
rtgui_dc_draw_text(dc, " rt-thread / RTGUI", &rect); rtgui_dc_draw_text(dc, " rt-thread / RTGUI", &rect);
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
return RT_FALSE; return RT_FALSE;
} }
@ -81,7 +81,7 @@ static rt_bool_t view_event_handler(struct rtgui_widget* widget, struct rtgui_ev
rect.y2 = 10; rect.y2 = 10;
rtgui_dc_fill_rect(dc, &rect); rtgui_dc_fill_rect(dc, &rect);
rtgui_dc_draw_text(dc, key_str, &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) 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; rect.y2 = 10;
rtgui_dc_fill_rect(dc, &rect); rtgui_dc_fill_rect(dc, &rect);
//rtgui_dc_draw_text(dc, key_str, &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) 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); rtgui_dc_draw_vline(dc, index, rect.y2-major, rect.y2);
break; break;
} }
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
} }
return rtgui_view_event_handler(widget, event); return rtgui_view_event_handler(widget, event);

View File

@ -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_draw_text_stroke(dc, __TIME__, &rect, HIGH_LIGHT, BLACK);
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
} }
return RT_FALSE; return RT_FALSE;
} }

View File

@ -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_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; return RT_FALSE;
} }

View File

@ -72,7 +72,7 @@ static rt_bool_t game_view_event_handler(struct rtgui_widget* widget, struct rtg
rect.y1 += 22; rect.y1 += 22;
rect.y2 = rect.y1 + 16; rect.y2 = rect.y1 + 16;
rtgui_dc_draw_text(dc, "score", &rect); rtgui_dc_draw_text(dc, "score", &rect);
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
/* start tetris game, removed later */ /* start tetris game, removed later */
rt_tetris_start(g_app_info.tetris); rt_tetris_start(g_app_info.tetris);

View File

@ -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_fill_rect(dc, &rect);
} }
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
return RT_EOK; 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); rtgui_dc_draw_text(dc, text, &rect);
/* Redraw panel */ /* Redraw panel */
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
return RT_EOK; 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); rtgui_dc_draw_text(dc, text, &rect);
/* Redraw panel */ /* Redraw panel */
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
return RT_EOK; 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 */ /* Redraw panel */
rtgui_dc_end_drawing(dc); rtgui_dc_end_drawing(dc, RT_TRUE);
return RT_EOK; return RT_EOK;
} }