fix(draw_line): use lv_point_precise_t to describe coordinates (#4858)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech
2023-11-24 20:41:43 +08:00
committed by GitHub
parent fc085c420b
commit 0447443029
12 changed files with 184 additions and 186 deletions

View File

@@ -47,10 +47,10 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line(struct _lv_layer_t * layer, const lv_dra
{
LV_PROFILER_BEGIN;
lv_area_t a;
a.x1 = (int32_t)LV_MIN(dsc->p1_x, dsc->p2_x) - dsc->width;
a.x2 = (int32_t)LV_MAX(dsc->p1_x, dsc->p2_x) + dsc->width;
a.y1 = (int32_t)LV_MIN(dsc->p1_y, dsc->p2_y) - dsc->width;
a.y2 = (int32_t)LV_MAX(dsc->p1_y, dsc->p2_y) + dsc->width;
a.x1 = (int32_t)LV_MIN(dsc->p1.x, dsc->p2.x) - dsc->width;
a.x2 = (int32_t)LV_MAX(dsc->p1.x, dsc->p2.x) + dsc->width;
a.y1 = (int32_t)LV_MIN(dsc->p1.y, dsc->p2.y) - dsc->width;
a.y2 = (int32_t)LV_MAX(dsc->p1.y, dsc->p2.y) + dsc->width;
lv_draw_task_t * t = lv_draw_add_task(layer, &a);