fix rectangle border part draw

This commit is contained in:
Gabor Kiss-Vamosi
2019-10-30 09:46:48 +01:00
parent 77706614e2
commit 224e422f43

View File

@@ -302,10 +302,10 @@ static void draw_border(const lv_area_t * coords, const lv_area_t * clip, const
/*Get the inner area*/
lv_area_t area_small;
lv_area_copy(&area_small, coords);
area_small.x1 += ((style->body.border.part & LV_BORDER_PART_LEFT) ? border_width : 0);
area_small.x2 -= ((style->body.border.part & LV_BORDER_PART_RIGHT) ? border_width : 0);
area_small.y1 += ((style->body.border.part & LV_BORDER_PART_TOP) ? border_width : 0);
area_small.y2 -= ((style->body.border.part & LV_BORDER_PART_BOTTOM) ? border_width : 0);
area_small.x1 += ((style->body.border.part & LV_BORDER_PART_LEFT) ? border_width : -border_width);
area_small.x2 -= ((style->body.border.part & LV_BORDER_PART_RIGHT) ? border_width : -border_width);
area_small.y1 += ((style->body.border.part & LV_BORDER_PART_TOP) ? border_width : -border_width);
area_small.y2 -= ((style->body.border.part & LV_BORDER_PART_BOTTOM) ? border_width : -border_width);
/*Create inner the mask*/
lv_draw_mask_radius_init(&mask_rin_param, &area_small, rout - border_width, true);