summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-07-20 19:25:28 +0100
committerRobin Watts <robin.watts@artifex.com>2015-08-17 12:34:33 +0100
commit88003e46fa0db666d4cbccdfa81857ca7853e55f (patch)
tree51ecec7126a2e0c058b7e53d9ac41dfca5f685f1 /source/fitz
parentffcd1d4b197a33c7d2d9f500451a2a40b52c23e9 (diff)
downloadmupdf-88003e46fa0db666d4cbccdfa81857ca7853e55f.tar.xz
Add JNI interface to MuPDFCore to read/write separations on a page.
Get separation information out to the Java level.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/document.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/fitz/document.c b/source/fitz/document.c
index 78bd707c..9c78187f 100644
--- a/source/fitz/document.c
+++ b/source/fitz/document.c
@@ -408,3 +408,31 @@ fz_page_presentation(fz_context *ctx, fz_page *page, float *duration)
return page->page_presentation(ctx, page, duration);
return NULL;
}
+
+int fz_count_separations_on_page(fz_context *ctx, fz_page *page)
+{
+ if (ctx == NULL || page == NULL || page->count_separations == NULL)
+ return 0;
+
+ return page->count_separations(ctx, page);
+}
+
+void fz_control_separation_on_page(fz_context *ctx, fz_page *page, int sep, int disable)
+{
+ if (ctx == NULL || page == NULL || page->control_separation == NULL)
+ return;
+
+ page->control_separation(ctx, page, sep, disable);
+}
+
+const char *fz_get_separation_on_page(fz_context *ctx, fz_page *page, int sep, uint32_t *rgba, uint32_t *cmyk)
+{
+ if (ctx == NULL || page == NULL || page->get_separation == NULL)
+ {
+ *rgba = 0;
+ *cmyk = 0;
+ return NULL;
+ }
+
+ return page->get_separation(ctx, page, sep, rgba, cmyk);
+}