summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/separation.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-07-03 18:33:48 +0100
committerRobin Watts <robin.watts@artifex.com>2017-07-19 19:41:23 +0100
commitf957eae764e6dbc74401b66d6a18ba3290fdb982 (patch)
tree224513a5080adde16386669feb0881aefe75794a /include/mupdf/fitz/separation.h
parent3d6cf4e4e543ce0d204db71ef8d0b9277219f250 (diff)
downloadmupdf-f957eae764e6dbc74401b66d6a18ba3290fdb982.tar.xz
Add spots to fz_pixmaps.
Update separations interface further to cope with whether spots should be rendered separately, or as composite colors.
Diffstat (limited to 'include/mupdf/fitz/separation.h')
-rw-r--r--include/mupdf/fitz/separation.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/include/mupdf/fitz/separation.h b/include/mupdf/fitz/separation.h
index 2f0ed596..4d17fc53 100644
--- a/include/mupdf/fitz/separation.h
+++ b/include/mupdf/fitz/separation.h
@@ -19,6 +19,18 @@ enum
typedef struct fz_separations_s fz_separations;
+typedef enum
+{
+ /* "Composite" separations are rendered using process
+ * colors using the equivalent colors */
+ FZ_SEPARATION_COMPOSITE = 0,
+ /* Spot colors are rendered into their own spot plane. */
+ FZ_SEPARATION_SPOT = 1,
+ /* Disabled colors are not rendered at all in the final
+ * output. */
+ FZ_SEPARATION_DISABLED = 2
+} fz_separation_behavior;
+
/* Create a new separations structure (initially empty) */
fz_separations *fz_new_separations(fz_context *ctx, int controllable);
@@ -31,22 +43,25 @@ 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);
-/* Enable or disable a given separation */
-void fz_control_separation(fz_context *ctx, fz_separations *sep, int separation, int disable);
+/* Control the rendering of a given separation */
+void fz_set_separation_behavior(fz_context *ctx, fz_separations *sep, int separation, fz_separation_behavior behavior);
-/* Test for a separation being enabled or disabled */
-int fz_separation_disabled(fz_context *ctx, fz_separations *sep, int separation);
+/* Test for the current behavior of a separation */
+fz_separation_behavior fz_separation_current_behavior(fz_context *ctx, const fz_separations *sep, int separation);
-/* Quick test for all separations enabled (the common case) */
-int fz_separations_all_enabled(fz_context *ctx, fz_separations *sep);
+/* 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, fz_separations *sep, int separation, uint32_t *rgb, uint32_t *cmyk);
+const char *fz_get_separation(fz_context *ctx, const fz_separations *sep, int separation, uint32_t *rgb, uint32_t *cmyk);
/* Count the number of separations */
-int fz_count_separations(fz_context *ctx, fz_separations *sep);
+int fz_count_separations(fz_context *ctx, const fz_separations *sep);
/* Find out if separations are controllable. */
-int fz_separations_controllable(fz_context *ctx, fz_separations *seps);
+int fz_separations_controllable(fz_context *ctx, const fz_separations *seps);
+
+/* Return the number of active separations. */
+int fz_count_active_separations(fz_context *ctx, const fz_separations *seps);
#endif