summaryrefslogtreecommitdiff
path: root/source/fitz/draw-device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-11-10 10:23:41 +0000
committerRobin Watts <robin.watts@artifex.com>2016-11-10 13:07:03 +0000
commitc88fa306d0b23403aa70ada5a2f03817b85c5d7a (patch)
tree647651a941513ef42dfada697a6fe4844d6293a0 /source/fitz/draw-device.c
parent4e1a495e671cf423663a0c36a35fc4acc7d44754 (diff)
downloadmupdf-c88fa306d0b23403aa70ada5a2f03817b85c5d7a.tar.xz
Add minimum line width configuration option.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r--source/fitz/draw-device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index d6d17782..d6d8c38e 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -350,10 +350,13 @@ fz_draw_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, const
float aa_level = 2.0f/(fz_graphics_aa_level(ctx)+2);
fz_draw_state *state = &dev->stack[dev->top];
fz_colorspace *model = state->dest->colorspace;
+ float mlw = fz_graphics_min_line_width(ctx);
if (colorspace == NULL && model != NULL)
fz_throw(ctx, FZ_ERROR_GENERIC, "color destination requires source color");
+ if (mlw > aa_level)
+ aa_level = mlw;
if (linewidth * expansion < aa_level)
linewidth = aa_level / expansion;
if (flatness < 0.001f)
@@ -500,7 +503,10 @@ fz_draw_clip_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path,
fz_draw_state *state = &dev->stack[dev->top];
fz_colorspace *model;
float aa_level = 2.0f/(fz_graphics_aa_level(ctx)+2);
+ float mlw = fz_graphics_min_line_width(ctx);
+ if (mlw > aa_level)
+ aa_level = mlw;
if (linewidth * expansion < aa_level)
linewidth = aa_level / expansion;
if (flatness < 0.001f)