diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-09-26 21:15:50 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-09-26 21:15:50 +0200 |
| commit | 37e7c66d65e00b9543003aba1f0f9b13a8dc151b (patch) | |
| tree | 84bdae441c09f9a8df4cea56465a325b7a319778 | |
| parent | 118f7c94053913be4a3667d0c21927b220c1fab5 (diff) | |
Compensate for radius of rounded corners
| -rw-r--r-- | src/main.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc index 96f79ae..c5d47fd 100644 --- a/src/main.cc +++ b/src/main.cc @@ -560,11 +560,13 @@ private: cairo_fill(cairo_.get()); } if (machine.requests > 0) { + auto radius = box_height / 10.0; cairo_set_line_width(cairo_.get(), 1.5); cairo_new_path(cairo_.get()); - cairo_move_to(cairo_.get(), pad_x + box_width, y); + cairo_move_to(cairo_.get(), pad_x + box_width - radius, y); cairo_rel_line_to(cairo_.get(), - -(machine.requests * box_width) / requests_, 0); + -(machine.requests * (box_width - radius * 2)) + / requests_, 0); cairo_set_source_rgb(cairo_.get(), 0, 0.6, 0); cairo_stroke(cairo_.get()); } |
