From fee66b72d296ecdd9654109c31e9dbfa4811d034 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Wed, 26 Jul 2017 23:06:07 -0700 Subject: Logic for Sep and DeviceN colorspaces with C,M,Y, or K. Special care is required when the DeviceN color space has cyan, magenta, yellow or black. For example, even if we support separations in the destination, if the color space has CMY or K as one of its colorants and we are drawing to an RGB or Gray pixmap we will want to do the tint transform. Also if the pixmap has no seps memember present, we support the separations if the destination is CMYK and the DeviceN colorspace has no "Spot" (non-CMYK) colorants. --- include/mupdf/fitz/colorspace.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/mupdf/fitz/colorspace.h b/include/mupdf/fitz/colorspace.h index bc042e30..e07ea538 100644 --- a/include/mupdf/fitz/colorspace.h +++ b/include/mupdf/fitz/colorspace.h @@ -16,6 +16,14 @@ enum FZ_RI_ABSOLUTE_COLORIMETRIC, }; +enum +{ + FZ_NOT_DEVICE_N, + FZ_DEVICE_N_SPOTS_ONLY, + FZ_DEVICE_N_WITH_CMYK, + FZ_DEVICE_N_CMYK_ONLY +}; + typedef struct fz_color_params_s fz_color_params; struct fz_color_params_s @@ -70,6 +78,17 @@ int fz_colorspace_is_subtractive(fz_context *ctx, const fz_colorspace *cs); */ int fz_colorspace_is_device_n(fz_context *ctx, const fz_colorspace *cs); +/* + fz_colorspace_device_n: Return information about device n colorants +*/ +int fz_colorspace_device_n_info(fz_context *ctx, const fz_colorspace *cs); + +/* + fz_colorspace_device_n_has_cmyk: Return true if devicen color space has cyan + magenta yellow or black as one of its colorants. +*/ +int fz_colorspace_device_n_has_cmyk(fz_context *ctx, const fz_colorspace *cs); + /* fz_device_gray: Get colorspace representing device specific gray. */ -- cgit v1.2.3