From 63713f22ae830142dfe0d3896948ec53c4705ace Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Fri, 23 Jun 2017 12:23:36 -0700 Subject: Add colorspace handling to transparency groups Also force softmasks to be isolated groups. --- include/mupdf/fitz/device.h | 4 ++-- include/mupdf/pdf/page.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h index 6d2c24c2..afbd8563 100644 --- a/include/mupdf/fitz/device.h +++ b/include/mupdf/fitz/device.h @@ -106,7 +106,7 @@ struct fz_device_s void (*begin_mask)(fz_context *, fz_device *, const fz_rect *, int luminosity, fz_colorspace *, const float *bc, const fz_color_params *); void (*end_mask)(fz_context *, fz_device *); - void (*begin_group)(fz_context *, fz_device *, const fz_rect *, int isolated, int knockout, int blendmode, float alpha); + void (*begin_group)(fz_context *, fz_device *, const fz_rect *, fz_colorspace *cs, int isolated, int knockout, int blendmode, float alpha); void (*end_group)(fz_context *, fz_device *); int (*begin_tile)(fz_context *, fz_device *, const fz_rect *area, const fz_rect *view, float xstep, float ystep, const fz_matrix *ctm, int id); @@ -141,7 +141,7 @@ void fz_fill_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const void fz_clip_image_mask(fz_context *ctx, fz_device *dev, fz_image *image, const fz_matrix *ctm, const fz_rect *scissor); void fz_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *area, int luminosity, fz_colorspace *colorspace, const float *bc, const fz_color_params *color_params); void fz_end_mask(fz_context *ctx, fz_device *dev); -void fz_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *area, int isolated, int knockout, int blendmode, float alpha); +void fz_begin_group(fz_context *ctx, fz_device *dev, const fz_rect *area, fz_colorspace *cs, int isolated, int knockout, int blendmode, float alpha); void fz_end_group(fz_context *ctx, fz_device *dev); void fz_begin_tile(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz_rect *view, float xstep, float ystep, const fz_matrix *ctm); int fz_begin_tile_id(fz_context *ctx, fz_device *dev, const fz_rect *area, const fz_rect *view, float xstep, float ystep, const fz_matrix *ctm, int id); diff --git a/include/mupdf/pdf/page.h b/include/mupdf/pdf/page.h index 3a077e37..4aae3481 100644 --- a/include/mupdf/pdf/page.h +++ b/include/mupdf/pdf/page.h @@ -39,6 +39,7 @@ void pdf_page_obj_transform(fz_context *ctx, pdf_obj *pageobj, fz_rect *page_med void pdf_page_transform(fz_context *ctx, pdf_page *page, fz_rect *mediabox, fz_matrix *ctm); pdf_obj *pdf_page_resources(fz_context *ctx, pdf_page *page); pdf_obj *pdf_page_contents(fz_context *ctx, pdf_page *page); +pdf_obj *pdf_page_group(fz_context *ctx, pdf_page *page); fz_link *pdf_load_links(fz_context *ctx, pdf_page *page); -- cgit v1.2.3