1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

add if(style->line.rounded)

This commit is contained in:
TridentTD 2019-10-09 23:12:47 +07:00 committed by GitHub
parent 8af6043e75
commit aa1d5080e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,11 +225,13 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo
uint16_t i;
lv_style_t circle_style_tmp; /*If rounded...*/
lv_style_copy(&circle_style_tmp, style);
circle_style_tmp.body.radius = LV_RADIUS_CIRCLE;
circle_style_tmp.body.main_color = style->line.color;
circle_style_tmp.body.grad_color = style->line.color;
circle_style_tmp.body.opa = style->line.opa;
if(style->line.rounded) {
lv_style_copy(&circle_style_tmp, style);
circle_style_tmp.body.radius = LV_RADIUS_CIRCLE;
circle_style_tmp.body.main_color = style->line.color;
circle_style_tmp.body.grad_color = style->line.color;
circle_style_tmp.body.opa = style->line.opa;
}
lv_area_t circle_area;
/*Read all points and draw the lines*/