diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/card.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/card.lua b/lib/card.lua index 8e04e0b..48a7f2e 100644 --- a/lib/card.lua +++ b/lib/card.lua @@ -184,6 +184,10 @@ function M.ring(cr, cx, cy, r, frac, colour, colors, width) if frac < 0 then frac = 0 elseif frac > 1 then frac = 1 end width = width or math.max(3, r * 0.18) + -- Start a fresh path. A preceding card.text() leaves a current point behind, + -- and cairo_arc() joins to it with a straight line, so without this every + -- ring after a label is drawn with a stray chord to the text baseline. + cairo_new_path(cr) cairo_set_line_width(cr, width) cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND) |
