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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user