summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-24 15:25:13 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-27 15:11:37 +0200
commit78c1264e14804a06c6d03072c8c57820fde4e148 (patch)
tree0c17cb985c847176a326457fa05fa937f8fa7bed /include
parentcb85c97aba355ebe53849743611aaf78a483d24e (diff)
downloadmupdf-78c1264e14804a06c6d03072c8c57820fde4e148.tar.xz
Remove fz_function abstract structure.
There is only one implementation, so don't bother with the abstraction. Just use pdf_function directly.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz.h1
-rw-r--r--include/mupdf/fitz/function.h39
-rw-r--r--include/mupdf/pdf/resource.h8
3 files changed, 7 insertions, 41 deletions
diff --git a/include/mupdf/fitz.h b/include/mupdf/fitz.h
index a84304e9..20f0edaa 100644
--- a/include/mupdf/fitz.h
+++ b/include/mupdf/fitz.h
@@ -35,7 +35,6 @@ extern "C" {
#include "mupdf/fitz/glyph.h"
#include "mupdf/fitz/bitmap.h"
#include "mupdf/fitz/image.h"
-#include "mupdf/fitz/function.h"
#include "mupdf/fitz/shade.h"
#include "mupdf/fitz/font.h"
#include "mupdf/fitz/path.h"
diff --git a/include/mupdf/fitz/function.h b/include/mupdf/fitz/function.h
deleted file mode 100644
index c750f194..00000000
--- a/include/mupdf/fitz/function.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef MUPDF_FITZ_FUNCTION_H
-#define MUPDF_FITZ_FUNCTION_H
-
-#include "mupdf/fitz/system.h"
-#include "mupdf/fitz/context.h"
-#include "mupdf/fitz/store.h"
-#include "mupdf/fitz/colorspace.h"
-
-/*
- * The generic function support.
- */
-
-typedef struct fz_function_s fz_function;
-
-void fz_eval_function(fz_context *ctx, fz_function *func, const float *in, int inlen, float *out, int outlen);
-fz_function *fz_keep_function(fz_context *ctx, fz_function *func);
-void fz_drop_function(fz_context *ctx, fz_function *func);
-size_t fz_function_size(fz_context *ctx, fz_function *func);
-
-enum
-{
- FZ_FN_MAXN = FZ_MAX_COLORS,
- FZ_FN_MAXM = FZ_MAX_COLORS
-};
-
-/*
- Structure definition is public so other classes can
- derive from it. Do not access the members directly.
-*/
-struct fz_function_s
-{
- fz_storable storable;
- size_t size;
- int m; /* number of input values */
- int n; /* number of output values */
- void (*evaluate)(fz_context *ctx, fz_function *func, const float *in, float *out);
-};
-
-#endif
diff --git a/include/mupdf/pdf/resource.h b/include/mupdf/pdf/resource.h
index d40464da..cbad160a 100644
--- a/include/mupdf/pdf/resource.h
+++ b/include/mupdf/pdf/resource.h
@@ -27,7 +27,13 @@ void pdf_drop_resource_tables(fz_context *ctx, pdf_document *doc);
* Functions, Colorspaces, Shadings and Images
*/
-fz_function *pdf_load_function(fz_context *ctx, pdf_document *doc, pdf_obj *ref, int in, int out);
+typedef struct pdf_function_s pdf_function;
+
+void pdf_eval_function(fz_context *ctx, pdf_function *func, const float *in, int inlen, float *out, int outlen);
+pdf_function *pdf_keep_function(fz_context *ctx, pdf_function *func);
+void pdf_drop_function(fz_context *ctx, pdf_function *func);
+size_t pdf_function_size(fz_context *ctx, pdf_function *func);
+pdf_function *pdf_load_function(fz_context *ctx, pdf_document *doc, pdf_obj *ref, int in, int out);
fz_colorspace *pdf_load_colorspace(fz_context *ctx, pdf_document *doc, pdf_obj *obj);
int pdf_is_tint_colorspace(fz_context *ctx, fz_colorspace *cs);