From 636c5c8193aa78d59c6805ef9207a21ee0aadb54 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 6 Sep 2022 15:32:20 +0100 Subject: Bug 705653: Fix dashing of multi-segment lines with round joins. Don't insert a round line join if the line segments are colinear and not-reversed. Otherwise the large round join can show past the end of dash segments. --- base/gxstroke.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/gxstroke.c b/base/gxstroke.c index cd389077e..345378437 100644 --- a/base/gxstroke.c +++ b/base/gxstroke.c @@ -2730,7 +2730,9 @@ add_pie_join(gx_path * ppath, pl_ptr plp, pl_ptr nplp, bool reflected, r = (double)(nplp->width.x) /* x2 */ * (plp->width.y) /* y1 */; if (l == r) { - if (cap) + /* Colinear. Suppress drawing a cap unless the path reverses direction. */ + if (cap && + ((double)(plp->width.x) * (nplp->width.x) + (double)(nplp->width.y) * (plp->width.y)) < 0) return add_pie_cap(ppath, &plp->e); else return gx_path_add_line(ppath, plp->e.ce.x, plp->e.ce.y); -- cgit v1.2.1