From a3952fcd0a51d1a94a93839a42b933c71f72d78d Mon Sep 17 00:00:00 2001 From: guoweilkd <1274132245@qq.com> Date: Thu, 23 Sep 2021 22:54:57 +0800 Subject: [PATCH] fix(label):make draw area contain ext_draw_size (#2587) --- src/widgets/lv_label.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/lv_label.c b/src/widgets/lv_label.c index 365544b0c..67b0dcb10 100644 --- a/src/widgets/lv_label.c +++ b/src/widgets/lv_label.c @@ -849,7 +849,7 @@ static void draw_main(lv_event_t * e) txt_coords.y2 = obj->coords.y2; } - lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint); + lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint); if(label->long_mode == LV_LABEL_LONG_SCROLL_CIRCULAR) { lv_point_t size; @@ -862,7 +862,7 @@ static void draw_main(lv_event_t * e) lv_font_get_glyph_width(label_draw_dsc.font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; label_draw_dsc.ofs_y = label->offset.y; - lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint); + lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint); } /*Draw the text again below the original to make a circular effect */ @@ -870,7 +870,7 @@ static void draw_main(lv_event_t * e) label_draw_dsc.ofs_x = label->offset.x; label_draw_dsc.ofs_y = label->offset.y + size.y + lv_font_get_line_height(label_draw_dsc.font); - lv_draw_label(&txt_coords, &txt_clip, &label_draw_dsc, label->text, hint); + lv_draw_label(&txt_coords, clip_area, &label_draw_dsc, label->text, hint); } } }