fix(vg_lite): alleviate the loss of precision in obtaining path bound (#7731)

Signed-off-by: zhangmingyu3 <zhangmingyu3@xiaomi.com>
Co-authored-by: zhangmingyu3 <zhangmingyu3@xiaomi.com>
This commit is contained in:
Shouko-4429
2025-02-11 08:01:19 +08:00
committed by GitHub
parent 09634a0b22
commit cbdc344464

View File

@@ -20,6 +20,7 @@
#include "lv_vg_lite_grad.h"
#include "lv_vg_lite_stroke.h"
#include <float.h>
#include <math.h>
/*********************
* DEFINES
@@ -390,7 +391,8 @@ static void lv_path_to_vg(lv_vg_lite_path_t * dest, const lv_vector_path_t * src
LV_ASSERT_MSG((lv_uintptr_t)path_data - (lv_uintptr_t)vg_path->path == path_length, "path length overflow");
lv_vg_lite_path_set_bounding_box(dest, min_x, min_y, max_x, max_y);
lv_vg_lite_path_set_bounding_box(dest, lroundf(min_x), lroundf(min_y),
lroundf(max_x), lroundf(max_y));
LV_PROFILER_DRAW_END;
}