Skip to content

Commit

Permalink
Etui pdf: fix compilation with mupdf 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
vtorri committed Mar 12, 2018
1 parent 0920d08 commit 0021e29
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/pdf/etui_module_pdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,18 @@ _etui_pdf_page_render(void *d)
fz_round_rect(&ibounds, fz_transform_rect(&bounds, &ctm));
width = ibounds.x1 - ibounds.x0;
height = ibounds.y1 - ibounds.y0;
#ifdef HAVE_MUPDF_1_11
image = fz_new_pixmap_with_bbox_and_data(md->doc.ctx,
fz_device_bgr(md->doc.ctx),
&ibounds, 1,
(unsigned char *)md->efl.m);
#endif
#ifdef HAVE_MUPDF_1_12
image = fz_new_pixmap_with_bbox_and_data(md->doc.ctx,
fz_device_bgr(md->doc.ctx),
&ibounds, NULL, 1,
(unsigned char *)md->efl.m);
#endif

fz_clear_pixmap_with_value(md->doc.ctx, image, 0xff);
dev = fz_new_draw_device(md->doc.ctx, NULL, image);
Expand Down

0 comments on commit 0021e29

Please sign in to comment.