diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-04-13 15:34:40 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-04-14 12:34:40 +0100 |
commit | f93098f6a34e920d6d99902c28e2c828af27b99a (patch) | |
tree | eb880b1722ab9dc7f5a6f8b177ebe4384af8ddbf /source/fitz/draw-device.c | |
parent | 31265b8439c37fdec06fc3438b77e38068f0a2bc (diff) | |
download | mupdf-f93098f6a34e920d6d99902c28e2c828af27b99a.tar.xz |
Scan converter; API tweak.
Decide whether to dash or not in the scan converter, not the
draw-device.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r-- | source/fitz/draw-device.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 88cb0a03..63ea7a03 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -359,10 +359,7 @@ fz_draw_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, const if (flatness < 0.001f) flatness = 0.001f; - if (stroke->dash_len > 0) - fz_flatten_dash_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); - else - fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); + fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); fz_intersect_irect(fz_bound_gel(ctx, gel, &bbox), &state->scissor); @@ -393,10 +390,7 @@ fz_draw_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, const fz_scan_convert(ctx, gel, 0, &bbox, state->dest, colorbv); if (state->shape) { - if (stroke->dash_len > 0) - fz_flatten_dash_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); - else - fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); + fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); colorbv[0] = 255; fz_scan_convert(ctx, gel, 0, &bbox, state->shape, colorbv); @@ -503,10 +497,7 @@ fz_draw_clip_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, if (flatness < 0.001f) flatness = 0.001f; - if (stroke->dash_len > 0) - fz_flatten_dash_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); - else - fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); + fz_flatten_stroke_path(ctx, gel, path, stroke, &ctm, flatness, linewidth, &state->scissor); state = push_stack(ctx, dev); STACK_PUSHED("clip stroke"); @@ -2374,10 +2365,7 @@ fz_bound_path_accurate(fz_context *ctx, fz_irect *bbox, const fz_irect *scissor, fz_gel *gel = fz_new_gel(ctx); if (stroke) - if (stroke->dash_len > 0) - fz_flatten_dash_path(ctx, gel, path, stroke, ctm, flatness, linewidth, scissor); - else - fz_flatten_stroke_path(ctx, gel, path, stroke, ctm, flatness, linewidth, scissor); + fz_flatten_stroke_path(ctx, gel, path, stroke, ctm, flatness, linewidth, scissor); else fz_flatten_fill_path(ctx, gel, path, ctm, flatness, scissor); fz_bound_gel(ctx, gel, bbox); |