summaryrefslogtreecommitdiff
path: root/platform/java
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-11-09 16:48:39 +0000
committerRobin Watts <robin.watts@artifex.com>2017-11-10 13:04:34 +0000
commit93ec9fcda7fdc74284c9ffe03915760650c02670 (patch)
tree35fb62d73081d9673525fc0e180676d32ca39d1b /platform/java
parent62fe02de29a64f4a642bc41964dfe5ba69f39ab7 (diff)
downloadmupdf-93ec9fcda7fdc74284c9ffe03915760650c02670.tar.xz
Fix potential problem with null path segments leaving dots.
When stroking paths if we meet segments of 0 length, we can't determine a direction, thus start/end caps are omitted. Line widths are irrelevant, and we thus render nothing. (Note that moves on their own do NOT count as a line segment). The exception to this is where we are using round caps, whereupon whatever direction the path is taken to have, the appearance will be the same - and this we render the segment as a dot. We have code in the renderer already to do this, but it looks to me like it could be fooled into leaving a dot by us first doing a move, a lineto the same point, and then a lineto to somewhere else. The current code sets the 'dot' value to 1 when it detects the degenerate line, and doesn't reset when it meets a non-degenerate line later. Accordingly I've changed the code here to account for such a circumstance. This produces no diffs in the cluster testing, but seems more correct to me.
Diffstat (limited to 'platform/java')
0 files changed, 0 insertions, 0 deletions