1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(draw_vector): alleviate the loss of precision in obtaining path bound (#7635)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX 2025-01-24 02:15:54 +08:00 committed by GitHub
parent 05a0395a1c
commit 2b97e0c022
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 4 deletions

View File

@ -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; if(p[i].y > y2) y2 = p[i].y;
} }
area->x1 = (int32_t)x1; area->x1 = lroundf(x1);
area->y1 = (int32_t)y1; area->y1 = lroundf(y1);
area->x2 = (int32_t)x2; area->x2 = lroundf(x2);
area->y2 = (int32_t)y2; area->y2 = lroundf(y2);
} }
void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry) void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB