Skip to content

Commit

Permalink
remove chart division lines' extra pixel at the ends
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jan 4, 2020
1 parent 678fbd5 commit 9c599e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lv_objx/lv_chart.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask)
}

p1.x = 0 + x_ofs;
p2.x = w + x_ofs;
p2.x = w - 1 + x_ofs;
for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
p1.y = (int32_t)((int32_t)(h - style->line.width) * div_i) / (ext->hdiv_cnt + 1);
p1.y += y_ofs;
Expand All @@ -836,7 +836,7 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask)
}

p1.y = 0 + y_ofs;
p2.y = h + y_ofs;
p2.y = h + y_ofs - 1;
for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
p1.x = (int32_t)((int32_t)(w - style->line.width) * div_i) / (ext->vdiv_cnt + 1);
p1.x += x_ofs;
Expand Down

0 comments on commit 9c599e1

Please sign in to comment.