diff --git a/src/draw/lv_draw_vector.c b/src/draw/lv_draw_vector.c index 28a08f289..20d0e2346 100644 --- a/src/draw/lv_draw_vector.c +++ b/src/draw/lv_draw_vector.c @@ -228,10 +228,10 @@ void lv_vector_path_get_bounding(const lv_vector_path_t * path, lv_area_t * area if(p[i].y > y2) y2 = p[i].y; } - area->x1 = (int32_t)x1; - area->y1 = (int32_t)y1; - area->x2 = (int32_t)x2; - area->y2 = (int32_t)y2; + area->x1 = lroundf(x1); + area->y1 = lroundf(y1); + area->x2 = lroundf(x2); + area->y2 = lroundf(y2); } void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry) diff --git a/tests/ref_imgs/draw/svg_draw_svg_text_2.lp32.png b/tests/ref_imgs/draw/svg_draw_svg_text_2.lp32.png index 2e528fd92..d7941ed2c 100644 Binary files a/tests/ref_imgs/draw/svg_draw_svg_text_2.lp32.png and b/tests/ref_imgs/draw/svg_draw_svg_text_2.lp32.png differ diff --git a/tests/ref_imgs/draw/svg_draw_svg_text_2.lp64.png b/tests/ref_imgs/draw/svg_draw_svg_text_2.lp64.png index 57f213327..cda7d0277 100644 Binary files a/tests/ref_imgs/draw/svg_draw_svg_text_2.lp64.png and b/tests/ref_imgs/draw/svg_draw_svg_text_2.lp64.png differ diff --git a/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp32.png b/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp32.png index 2e528fd92..d7941ed2c 100644 Binary files a/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp32.png and b/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp32.png differ diff --git a/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp64.png b/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp64.png index 57f213327..cda7d0277 100644 Binary files a/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp64.png and b/tests/ref_imgs_vg_lite/draw/svg_draw_svg_text_2.lp64.png differ