diff options
-rw-r--r-- | fitz/node_path.c | 3 | ||||
-rw-r--r-- | fitzdraw/pathstroke.c | 10 | ||||
-rw-r--r-- | fitzdraw/render.c | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/fitz/node_path.c b/fitz/node_path.c index c21de87a..1d0e7bf9 100644 --- a/fitz/node_path.c +++ b/fitz/node_path.c @@ -170,9 +170,6 @@ fz_endpath(fz_pathnode *path, fz_pathkind paint, fz_stroke *stroke, fz_dash *das path->miterlimit = stroke->miterlimit; } - if (path->linewidth < 0.01) - path->linewidth = 0.01; - return fz_okay; } 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; diff --git a/fitzdraw/render.c b/fitzdraw/render.c index 48c5fd05..cbd5d15f 100644 --- a/fitzdraw/render.c +++ b/fitzdraw/render.c @@ -203,9 +203,8 @@ renderpath(fz_renderer *gc, fz_pathnode *path, fz_matrix ctm) { float lw = path->linewidth; /* Check for hairline */ - if (lw * expansion < 0.1) { + if (lw * expansion < 0.1) lw = 1.0f / expansion; - } if (path->dash) error = fz_dashpath(gc->gel, path, ctm, flatness, lw); else |