mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
lv_label_draw fix with offset.y
This commit is contained in:
parent
9572c7d4ed
commit
62195b7cc7
@ -78,6 +78,14 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
pos.x = coords->x1;
|
||||
pos.y = coords->y1;
|
||||
|
||||
lv_coord_t x_ofs = 0;
|
||||
lv_coord_t y_ofs = 0;
|
||||
if(offset != NULL) {
|
||||
x_ofs = offset->x;
|
||||
y_ofs = offset->y;
|
||||
pos.y += y_ofs;
|
||||
}
|
||||
|
||||
uint32_t line_start = 0;
|
||||
uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag);
|
||||
|
||||
@ -115,14 +123,6 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st
|
||||
lv_color_t recolor;
|
||||
lv_coord_t letter_w;
|
||||
|
||||
lv_coord_t x_ofs = 0;
|
||||
lv_coord_t y_ofs = 0;
|
||||
if(offset != NULL) {
|
||||
x_ofs = offset->x;
|
||||
y_ofs = offset->y;
|
||||
pos.y += y_ofs;
|
||||
}
|
||||
|
||||
/*Real draw need a background color for higher bpp letter*/
|
||||
#if LV_VDB_SIZE == 0
|
||||
lv_rletter_set_background(style->body.main_color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user