diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-10-01 19:20:45 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-03-26 13:58:59 +0000 |
commit | 68660cd89703996ca315b4affcf37582ed660237 (patch) | |
tree | e44026bfde0a28f27e136d0fa2bc83130c773eeb /fitz/fitz-internal.h | |
parent | 266a1a44d2f6e73878fb742e088ea722873a182e (diff) | |
download | mupdf-68660cd89703996ca315b4affcf37582ed660237.tar.xz |
Make pdf_functions public as fz_functions.
Implementations remain unexposed, but this means we can safely
pass functions in shades without having to 'sample' them (though
we may still choose to do this for speed).
Diffstat (limited to 'fitz/fitz-internal.h')
-rw-r--r-- | fitz/fitz-internal.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h index 01f32172..a54a4780 100644 --- a/fitz/fitz-internal.h +++ b/fitz/fitz-internal.h @@ -1274,6 +1274,38 @@ fz_text *fz_clone_text(fz_context *ctx, fz_text *old); void fz_print_text(fz_context *ctx, FILE *out, fz_text*); /* + * The generic function support. + */ + +typedef struct fz_function_s fz_function; + +void fz_eval_function(fz_context *ctx, fz_function *func, 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); +unsigned int fz_function_size(fz_function *func); +#ifndef DEBUG +void pdf_debug_function(fz_function *func); +#endif + +enum +{ + FZ_FN_MAXN = FZ_MAX_COLORS, + FZ_FN_MAXM = FZ_MAX_COLORS +}; + +struct fz_function_s +{ + fz_storable storable; + unsigned int size; + int m; /* number of input values */ + int n; /* number of output values */ + void (*evaluate)(fz_context *ctx, fz_function *func, float *in, float *out); +#ifndef NDEBUG + void (*debug)(fz_function *func); +#endif +}; + +/* * The shading code uses gouraud shaded triangle meshes. */ |