summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/separation.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-07-13 17:32:32 +0100
committerRobin Watts <robin.watts@artifex.com>2017-09-08 17:48:07 +0100
commit7e4a177d55b3a290300f6671c0670e5a5897da24 (patch)
tree81190342149dc508787247efa78854383997cad8 /include/mupdf/fitz/separation.h
parenta7f36241cba4d1807ab4664201aa0975755d6772 (diff)
downloadmupdf-7e4a177d55b3a290300f6671c0670e5a5897da24.tar.xz
Update fz_separations equivalent color mechanism.
Incorporates fixes from Michael. Rather than specifically giving it rgb and cmyk values, separations now include the colorspace. Conversions can then be done into ANY colorspace we need. Note, that we maintain the old way of working for the gproof device. Also, fix pdf_page_separations to correctly find all separations. This involves recursively looking through colorspaces, forms and shadings for colorspaces therein, making sure we don't run into any circular references. We do 2 passes, so that we can pick up as many colorants as Separations as possible. On the second pass we pick up any colorants we missed in terms of DeviceN spaces. The purpose of this is to try to ensure that we get as many tint transforms as single input functions as we can. This may not be important in the grand scheme of things, but seems neater.
Diffstat (limited to 'include/mupdf/fitz/separation.h')
-rw-r--r--include/mupdf/fitz/separation.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/mupdf/fitz/separation.h b/include/mupdf/fitz/separation.h
index 4b4be865..9bbb1845 100644
--- a/include/mupdf/fitz/separation.h
+++ b/include/mupdf/fitz/separation.h
@@ -40,8 +40,11 @@ fz_separations *fz_keep_separations(fz_context *ctx, fz_separations *sep);
/* Drop a reference */
void fz_drop_separations(fz_context *ctx, fz_separations *sep);
-/* Add a separation (RGBA and CYMK equivalents, null terminated name) */
-void fz_add_separation(fz_context *ctx, fz_separations *sep, uint32_t rgba, uint32_t cmyk, const char *name);
+/* Add a separation (null terminated name, colorspace) */
+void fz_add_separation(fz_context *ctx, fz_separations *sep, const char *name, fz_colorspace *cs, int cs_channel);
+
+/* Add a separation with equivalents (null terminated name, colorspace) (old, deprecated) */
+void fz_add_separation_equivalents(fz_context *ctx, fz_separations *sep, uint32_t rgba, uint32_t cmyk, const char *name);
/* Control the rendering of a given separation */
void fz_set_separation_behavior(fz_context *ctx, fz_separations *sep, int separation, fz_separation_behavior behavior);
@@ -52,8 +55,8 @@ fz_separation_behavior fz_separation_current_behavior(fz_context *ctx, const fz_
/* Quick test for all separations composite (the common case) */
int fz_separations_all_composite(fz_context *ctx, const fz_separations *sep);
-/* Read separation details */
-const char *fz_get_separation(fz_context *ctx, const fz_separations *sep, int separation, uint32_t *rgb, uint32_t *cmyk);
+/* Read separation name */
+const char *fz_separation_name(fz_context *ctx, const fz_separations *sep, int separation);
/* Count the number of separations */
int fz_count_separations(fz_context *ctx, const fz_separations *sep);
@@ -72,4 +75,7 @@ fz_separations *fz_clone_separations_for_overprint(fz_context *ctx, fz_separatio
* to a color in terms of another colorspace/separations. */
void fz_convert_separation_colors(fz_context *ctx, const fz_color_params *color_params, const fz_colorspace *dst_cs, const fz_separations *dst_sep, float *dst_color, const fz_colorspace *src_cs, const float *src_color);
+/* Get the equivalent separation color in a given colorspace. */
+void fz_separation_equivalent(fz_context *ctx, const fz_separations *seps, int i, const fz_color_params *color_params, const fz_colorspace *dst_cs, const fz_colorspace *prf, float *convert);
+
#endif