diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-09-06 15:32:20 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-09-07 08:54:28 +0100 |
commit | 636c5c8193aa78d59c6805ef9207a21ee0aadb54 (patch) | |
tree | 29f991d9dc3d9a7e15a1fb43a08c0fb67b665be6 | |
parent | 38765ba214ad56dab4a7e37000c01df45ea3f5ad (diff) | |
download | ghostpdl-636c5c8193aa78d59c6805ef9207a21ee0aadb54.tar.gz |
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.
-rw-r--r-- | base/gxstroke.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |