Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_FUNCTION_H
2
#define MUPDF_FITZ_FUNCTION_H
3
4
#include "mupdf/fitz/system.h"
5
#include "mupdf/fitz/context.h"
6
#include "mupdf/fitz/store.h"
7
#include "mupdf/fitz/colorspace.h"
8
9
/*
10
* The generic function support.
11
*/
12
13
typedef struct fz_function_s fz_function;
14
15
void fz_eval_function(fz_context *ctx, fz_function *func, const float *in, int inlen, float *out, int outlen);
16
fz_function *fz_keep_function(fz_context *ctx, fz_function *func);
17
void fz_drop_function(fz_context *ctx, fz_function *func);
18
unsigned int fz_function_size(fz_context *ctx, fz_function *func);
19
#ifndef NDEBUG
20
void pdf_debug_function(fz_context *ctx, fz_function *func);
21
#endif
22
23
enum
24
{
25
FZ_FN_MAXN = FZ_MAX_COLORS,
26
FZ_FN_MAXM = FZ_MAX_COLORS
27
};
28
29
struct fz_function_s
30
{
31
fz_storable storable;
32
unsigned int size;
33
int m; /* number of input values */
34
int n; /* number of output values */
35
void (*evaluate)(fz_context *ctx, fz_function *func, const float *in, float *out);
36
#ifndef NDEBUG
37
void (*debug)(fz_context *ctx, fz_function *func);
38
#endif
39
};
40
41
#endif
42
43