From e6a6cccd2295ad09fc569debda49ebcef8b2cd92 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 28 Sep 2015 17:05:38 +0100 Subject: Ensure that dots are non-zero sized. In fz_add_line_dot, if the flatness is too low, we can end up with dots being 1 dimensional. Ensure that we always use at least 3 vertexes to approximate a dot. This was inspired by (but does not fix) bug 696172. --- source/fitz/draw-path.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/fitz/draw-path.c b/source/fitz/draw-path.c index bf7a9022..0d37c0da 100644 --- a/source/fitz/draw-path.c +++ b/source/fitz/draw-path.c @@ -594,6 +594,8 @@ fz_add_line_dot(fz_context *ctx, sctx *s, float ax, float ay) float oy = ay; int i; + if (n < 3) + n = 3; for (i = 1; i < n; i++) { float theta = (float)M_PI * 2 * i / n; -- cgit v1.2.3