diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-07-03 00:50:56 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-07-03 00:50:56 +0200 |
commit | 322f289734b045fd2d14de0f8cef89658001be01 (patch) | |
tree | 2b196c3077347d83e37728e26145a4bf38377094 /fitzdraw/pathstroke.c | |
parent | 3b85981ec662a82642a5453d6f795fecd870aace (diff) | |
download | mupdf-322f289734b045fd2d14de0f8cef89658001be01.tar.xz |
Be less strict when comparing tiny features with epsilon in the path stroking logic.
Diffstat (limited to 'fitzdraw/pathstroke.c')
-rw-r--r-- | fitzdraw/pathstroke.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fitzdraw/pathstroke.c b/fitzdraw/pathstroke.c index b597a425..94409789 100644 --- a/fitzdraw/pathstroke.c +++ b/fitzdraw/pathstroke.c @@ -128,9 +128,13 @@ linejoin(struct sctx *s, fz_point a, fz_point b, fz_point c) dy1 = c.y - b.y; if (dx0 * dx0 + dy0 * dy0 < FLT_EPSILON) - return fz_okay; + { + linejoin = BEVEL; + } if (dx1 * dx1 + dy1 * dy1 < FLT_EPSILON) - return fz_okay; + { + linejoin = BEVEL; + } scale = linewidth / sqrt(dx0 * dx0 + dy0 * dy0); dlx0 = dy0 * scale; @@ -342,7 +346,7 @@ strokelineto(struct sctx *s, fz_point cur) float dx = cur.x - s->seg[s->sn-1].x; float dy = cur.y - s->seg[s->sn-1].y; - if (dx * dx + dy * dy < s->flatness * s->flatness * 0.25) + if (dx * dx + dy * dy < FLT_EPSILON) { s->dot = 1; return fz_okay; |