diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-07-02 18:32:46 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-07-10 19:18:40 +0100 |
commit | 2a3df1de7b2a97519b8605a98a3d2c21d3d57859 (patch) | |
tree | 03ed4ae2a4da32401440fcd048c248c684a77f83 | |
parent | 49b5135d1a7df9a9f05fd2fd5d15462424f7e4b9 (diff) | |
download | mupdf-2a3df1de7b2a97519b8605a98a3d2c21d3d57859.tar.xz |
Add some more comments to the fz_separations class.
Hopefully this clarifies the intent.
-rw-r--r-- | include/mupdf/fitz/separation.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/mupdf/fitz/separation.h b/include/mupdf/fitz/separation.h index 8832414e..7cb7c411 100644 --- a/include/mupdf/fitz/separation.h +++ b/include/mupdf/fitz/separation.h @@ -4,6 +4,14 @@ #include "mupdf/fitz/system.h" #include "mupdf/fitz/context.h" +/* + An fz_separation structure holds details of a set of separations + (such as might be used on within a page of the document). + + The app might control the separations by enabling/disabling them, + and subsequent renders would take this into account. +*/ + enum { FZ_MAX_SEPARATIONS = 64 @@ -11,14 +19,31 @@ enum typedef struct fz_separations_s fz_separations; +/* Create a new separations structure (initially empty) */ fz_separations *fz_new_separations(fz_context *ctx); + +/* Add a reference */ fz_separations *fz_keep_separations(fz_context *ctx, fz_separations *sep); + +/* Drop a reference */ void fz_drop_separations(fz_context *ctx, fz_separations *sep); -void fz_add_separation(fz_context *ctx, fz_separations *sep, uint32_t rgb, uint32_t cmyk, char *name); + +/* 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, char *name); + +/* Enable or disable a given separation */ void fz_control_separation(fz_context *ctx, fz_separations *sep, int separation, int disable); + +/* Test for a separation being enabled or disabled */ int fz_separation_disabled(fz_context *ctx, 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); + +/* Read separation details */ const char *fz_get_separation(fz_context *ctx, 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); #endif |