From 1927376fe571a17fec6a5cca7a2abff63c35980c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 16:17:32 +0100 Subject: [PATCH] move lv_utils to src/lv_misc --- src/lv_misc/lv_utils.c | 2 +- src/lv_objx/lv_chart.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lv_misc/lv_utils.c b/src/lv_misc/lv_utils.c index 5ea617710..2d91526fa 100644 --- a/src/lv_misc/lv_utils.c +++ b/src/lv_misc/lv_utils.c @@ -52,7 +52,7 @@ char * lv_utils_num_to_str(int32_t num, char * buf) int8_t i = 0; if (num < 0) { buf[digitCount++] = '-'; - num = abs(num); + num = LV_MATH_ABS(num); ++i; } while (num) { diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index c41acb912..871d56b66 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -844,12 +844,10 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); lv_style_t style; lv_style_copy(&style, &lv_style_plain); - style.line.opa = ext->series.opa; - style.line.width = ext->series.width; /*Go through all data lines*/ LV_LL_READ_BACK(ext->series_ll, ser) { - style.line.color = ser->color; + style.body.main_color = ser->color; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; @@ -877,9 +875,9 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) triangle_points[1].y = y_ofs + h; triangle_points[2].x = p1.x; triangle_points[2].y = y_ofs + h; - lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + lv_draw_triangle(triangle_points, mask, &style, opa_scale); triangle_points[2] = p2; - lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + lv_draw_triangle(triangle_points, mask, &style, opa_scale); } p_prev = p_act; }