diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-device.c | 2 | ||||
-rw-r--r-- | source/pdf/pdf-op-run.c | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c index a2ee1295..dce26a3a 100644 --- a/source/pdf/pdf-device.c +++ b/source/pdf/pdf-device.c @@ -980,7 +980,7 @@ pdf_dev_stroke_text(fz_context *ctx, fz_device *dev, fz_text *text, fz_stroke_st } static void -pdf_dev_clip_text(fz_context *ctx, fz_device *dev, fz_text *text, const fz_matrix *ctm, int accumulate) +pdf_dev_clip_text(fz_context *ctx, fz_device *dev, fz_text *text, const fz_matrix *ctm) { pdf_device *pdev = (pdf_device*)dev; fz_text_span *span; diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index ea2384be..f18b593d 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -85,7 +85,6 @@ struct pdf_run_processor_s fz_matrix tlm; fz_matrix tm; int text_mode; - int accumulate; /* graphics state */ pdf_gstate *gstate; @@ -794,7 +793,7 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) case PDF_MAT_PATTERN: if (gstate->fill.pattern) { - fz_clip_text(ctx, pr->dev, text, &gstate->ctm, 0); + fz_clip_text(ctx, pr->dev, text, &gstate->ctm); pdf_show_pattern(ctx, pr, gstate->fill.pattern, &pr->gstate[gstate->fill.gstate_num], &tb, PDF_FILL); fz_pop_clip(ctx, pr->dev); } @@ -802,7 +801,7 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) case PDF_MAT_SHADE: if (gstate->fill.shade) { - fz_clip_text(ctx, pr->dev, text, &gstate->ctm, 0); + fz_clip_text(ctx, pr->dev, text, &gstate->ctm); /* Page 2 of patterns.pdf shows that fz_fill_shade should NOT be called with gstate->ctm */ fz_fill_shade(ctx, pr->dev, gstate->fill.shade, &pr->gstate[gstate->fill.gstate_num].ctm, gstate->fill.alpha); fz_pop_clip(ctx, pr->dev); @@ -848,10 +847,8 @@ pdf_flush_text(fz_context *ctx, pdf_run_processor *pr) if (doclip) { - if (pr->accumulate < 2) - gstate->clip_depth++; - fz_clip_text(ctx, pr->dev, text, &gstate->ctm, pr->accumulate); - pr->accumulate = 2; + gstate->clip_depth++; + fz_clip_text(ctx, pr->dev, text, &gstate->ctm); } } fz_always(ctx) @@ -1626,7 +1623,6 @@ static void pdf_run_ET(fz_context *ctx, pdf_processor *proc) { pdf_run_processor *pr = (pdf_run_processor *)proc; pdf_flush_text(ctx, pr); - pr->accumulate = 1; } /* text state */ @@ -2126,7 +2122,6 @@ pdf_new_run_processor(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, con proc->tlm = fz_identity; proc->tm = fz_identity; proc->text_mode = 0; - proc->accumulate = 1; fz_try(ctx) { |