mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-28 05:26:18 +08:00
fix(vg_lite): fix path bonding box coordinate overflow (#7037)
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
@@ -25,6 +25,10 @@
|
|||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|
||||||
|
/* Since thorvg has an upper limit on coordinates, choose a suitable value here */
|
||||||
|
#define PATH_COORD_MAX (1 << 18)
|
||||||
|
#define PATH_COORD_MIN (-PATH_COORD_MAX)
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* TYPEDEFS
|
* TYPEDEFS
|
||||||
**********************/
|
**********************/
|
||||||
@@ -181,8 +185,8 @@ static void task_draw_cb(void * ctx, const lv_vector_path_t * path, const lv_vec
|
|||||||
|
|
||||||
/* no bonding box */
|
/* no bonding box */
|
||||||
lv_vg_lite_path_set_bonding_box(lv_vg_path,
|
lv_vg_lite_path_set_bonding_box(lv_vg_path,
|
||||||
(float)LV_COORD_MIN, (float)LV_COORD_MIN,
|
(float)PATH_COORD_MIN, (float)PATH_COORD_MIN,
|
||||||
(float)LV_COORD_MAX, (float)LV_COORD_MAX);
|
(float)PATH_COORD_MAX, (float)PATH_COORD_MAX);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* calc inverse matrix */
|
/* calc inverse matrix */
|
||||||
|
|||||||
Reference in New Issue
Block a user