diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2016-09-28 22:25:16 -0400 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-10-06 11:54:10 +0100 |
commit | 80d6490e6d54f822de6d36219ce08e6a8ad33137 (patch) | |
tree | b3b5bf787b1454e82275be0b452c4edc8ce432de /include | |
parent | 994770e2010e21cd8f90bacc34b9fae8a6350a40 (diff) | |
download | mupdf-80d6490e6d54f822de6d36219ce08e6a8ad33137.tar.xz |
Hide internals of fz_colorspace
The implementation does not need to be in the public API.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/colorspace.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/mupdf/fitz/colorspace.h b/include/mupdf/fitz/colorspace.h index b326757a..8eef8df3 100644 --- a/include/mupdf/fitz/colorspace.h +++ b/include/mupdf/fitz/colorspace.h @@ -73,24 +73,20 @@ void fz_set_device_bgr(fz_context *ctx, fz_colorspace *cs); */ void fz_set_device_cmyk(fz_context *ctx, fz_colorspace *cs); -struct fz_colorspace_s -{ - fz_storable storable; - size_t size; - char name[16]; - int n; - void (*to_rgb)(fz_context *ctx, fz_colorspace *, const float *src, float *rgb); - void (*from_rgb)(fz_context *ctx, fz_colorspace *, const float *rgb, float *dst); - void (*free_data)(fz_context *Ctx, fz_colorspace *); - void *data; -}; +typedef void (fz_colorspace_convert_fn)(fz_context *ctx, fz_colorspace *cs, const float *src, float *dst); -fz_colorspace *fz_new_colorspace(fz_context *ctx, char *name, int n); +typedef void (fz_colorspace_destruct_fn)(fz_context *ctx, fz_colorspace *cs); + +fz_colorspace *fz_new_colorspace(fz_context *ctx, char *name, int n, fz_colorspace_convert_fn *to_rgb, fz_colorspace_convert_fn *from_rgb, fz_colorspace_destruct_fn *destruct, void *data, size_t size); fz_colorspace *fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsigned char *lookup); fz_colorspace *fz_keep_colorspace(fz_context *ctx, fz_colorspace *colorspace); void fz_drop_colorspace(fz_context *ctx, fz_colorspace *colorspace); void fz_drop_colorspace_imp(fz_context *ctx, fz_storable *colorspace); +int fz_colorspace_is(fz_context *ctx, const fz_colorspace *cs, fz_colorspace_convert_fn *to_rgb); +int fz_colorspace_n(fz_context *ctx, const fz_colorspace *cs); +const char *fz_colorspace_name(fz_context *ctx, const fz_colorspace *cs); + void fz_convert_color(fz_context *ctx, fz_colorspace *dsts, float *dstv, fz_colorspace *srcs, const float *srcv); void fz_new_colorspace_context(fz_context *ctx); |