diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-05 12:13:58 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-05 12:13:58 +0200 |
commit | 4272afa118f4badb9a288633fda4bc7d26c2eaf0 (patch) | |
tree | f14a3eb208009a88cc56dfd5da5ec481235e9329 | |
parent | c61a13b445c2d4d7b6468a0f2fe7ab998e210e90 (diff) | |
download | mupdf-4272afa118f4badb9a288633fda4bc7d26c2eaf0.tar.xz |
Update the display list device to use the new device functions.
-rw-r--r-- | fitz/dev_list.c | 43 | ||||
-rw-r--r-- | pdf/pdf_interpret.c | 5 |
2 files changed, 23 insertions, 25 deletions
diff --git a/fitz/dev_list.c b/fitz/dev_list.c index d9293dc4..0cc5e992 100644 --- a/fitz/dev_list.c +++ b/fitz/dev_list.c @@ -1,7 +1,6 @@ #include "fitz.h" -#define ISOLATED 1 -#define KNOCKOUT 2 +enum { ISOLATED = 1, KNOCKOUT = 2 }; static fz_display_node * fz_new_display_node(fz_display_command cmd, fz_matrix ctm, @@ -436,78 +435,78 @@ visible: switch (node->cmd) { case FZ_CMD_FILL_PATH: - dev->fill_path(dev->user, node->item.path, node->flag, ctm, + fz_fill_path(dev, node->item.path, node->flag, ctm, node->colorspace, node->color, node->alpha); break; case FZ_CMD_STROKE_PATH: - dev->stroke_path(dev->user, node->item.path, node->stroke, ctm, + fz_stroke_path(dev, node->item.path, node->stroke, ctm, node->colorspace, node->color, node->alpha); break; case FZ_CMD_CLIP_PATH: - dev->clip_path(dev->user, node->item.path, node->flag, ctm); + fz_clip_path(dev, node->item.path, node->flag, ctm); break; case FZ_CMD_CLIP_STROKE_PATH: - dev->clip_stroke_path(dev->user, node->item.path, node->stroke, ctm); + fz_clip_stroke_path(dev, node->item.path, node->stroke, ctm); break; case FZ_CMD_FILL_TEXT: - dev->fill_text(dev->user, node->item.text, ctm, + fz_fill_text(dev, node->item.text, ctm, node->colorspace, node->color, node->alpha); break; case FZ_CMD_STROKE_TEXT: - dev->stroke_text(dev->user, node->item.text, node->stroke, ctm, + fz_stroke_text(dev, node->item.text, node->stroke, ctm, node->colorspace, node->color, node->alpha); break; case FZ_CMD_CLIP_TEXT: - dev->clip_text(dev->user, node->item.text, ctm, node->flag); + fz_clip_text(dev, node->item.text, ctm, node->flag); break; case FZ_CMD_CLIP_STROKE_TEXT: - dev->clip_stroke_text(dev->user, node->item.text, node->stroke, ctm); + fz_clip_stroke_text(dev, node->item.text, node->stroke, ctm); break; case FZ_CMD_IGNORE_TEXT: - dev->ignore_text(dev->user, node->item.text, ctm); + fz_ignore_text(dev, node->item.text, ctm); break; case FZ_CMD_FILL_SHADE: - dev->fill_shade(dev->user, node->item.shade, ctm, node->alpha); + fz_fill_shade(dev, node->item.shade, ctm, node->alpha); break; case FZ_CMD_FILL_IMAGE: - dev->fill_image(dev->user, node->item.image, ctm, node->alpha); + fz_fill_image(dev, node->item.image, ctm, node->alpha); break; case FZ_CMD_FILL_IMAGE_MASK: - dev->fill_image_mask(dev->user, node->item.image, ctm, + fz_fill_image_mask(dev, node->item.image, ctm, node->colorspace, node->color, node->alpha); break; case FZ_CMD_CLIP_IMAGE_MASK: - dev->clip_image_mask(dev->user, node->item.image, ctm); + fz_clip_image_mask(dev, node->item.image, ctm); break; case FZ_CMD_POP_CLIP: - dev->pop_clip(dev->user); + fz_pop_clip(dev); break; case FZ_CMD_BEGIN_MASK: bbox = fz_transform_rect(top_ctm, node->rect); - dev->begin_mask(dev->user, bbox, node->flag, node->colorspace, node->color); + fz_begin_mask(dev, bbox, node->flag, node->colorspace, node->color); break; case FZ_CMD_END_MASK: - dev->end_mask(dev->user); + fz_end_mask(dev); break; case FZ_CMD_BEGIN_GROUP: bbox = fz_transform_rect(top_ctm, node->rect); - dev->begin_group(dev->user, bbox, + fz_begin_group(dev, bbox, node->flag & ISOLATED, node->flag & KNOCKOUT, node->item.blendmode, node->alpha); break; case FZ_CMD_END_GROUP: - dev->end_group(dev->user); + fz_end_group(dev); break; case FZ_CMD_BEGIN_TILE: bbox.x0 = node->color[2]; bbox.y0 = node->color[3]; bbox.x1 = node->color[4]; bbox.y1 = node->color[5]; - dev->begin_tile(dev->user, node->rect, bbox, + fz_begin_tile(dev, node->rect, bbox, node->color[0], node->color[1], ctm); break; case FZ_CMD_END_TILE: - dev->end_tile(dev->user); + fz_end_tile(dev); break; } } diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c index 908ea504..d045d54f 100644 --- a/pdf/pdf_interpret.c +++ b/pdf/pdf_interpret.c @@ -1408,8 +1408,7 @@ pdf_run_page_with_usage(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matri int flags; if (page->transparency) - dev->begin_group(dev->user, - fz_transform_rect(ctm, page->mediabox), + fz_begin_group(dev, fz_transform_rect(ctm, page->mediabox), 0, 0, FZ_BLEND_NORMAL, 1); csi = pdf_new_csi(xref, dev, ctm, target); @@ -1441,7 +1440,7 @@ pdf_run_page_with_usage(pdf_xref *xref, pdf_page *page, fz_device *dev, fz_matri } if (page->transparency) - dev->end_group(dev->user); + fz_end_group(dev); return fz_okay; } |