refactor: replace lv_coord_t with int32_t

This commit is contained in:
Gabor Kiss-Vamosi
2023-10-31 19:25:01 +01:00
parent d456b1cb4d
commit a5a58e39d2
194 changed files with 2431 additions and 2434 deletions

View File

@@ -70,9 +70,9 @@ static void add_faded_area(lv_event_t * e)
tri_dsc.p[2].y = LV_MAX(draw_line_dsc->p1_y, draw_line_dsc->p2_y);
tri_dsc.bg_grad.dir = LV_GRAD_DIR_VER;
lv_coord_t full_h = lv_obj_get_height(obj);
lv_coord_t fract_uppter = (int32_t)(LV_MIN(draw_line_dsc->p1_y, draw_line_dsc->p2_y) - obj->coords.y1) * 255 / full_h;
lv_coord_t fract_lower = (int32_t)(LV_MAX(draw_line_dsc->p1_y, draw_line_dsc->p2_y) - obj->coords.y1) * 255 / full_h;
int32_t full_h = lv_obj_get_height(obj);
int32_t fract_uppter = (int32_t)(LV_MIN(draw_line_dsc->p1_y, draw_line_dsc->p2_y) - obj->coords.y1) * 255 / full_h;
int32_t fract_lower = (int32_t)(LV_MAX(draw_line_dsc->p1_y, draw_line_dsc->p2_y) - obj->coords.y1) * 255 / full_h;
tri_dsc.bg_grad.stops[0].color = ser->color;
tri_dsc.bg_grad.stops[0].opa = 255 - fract_uppter;
tri_dsc.bg_grad.stops[0].frac = 0;