diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-07-28 12:42:31 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-24 15:16:35 +0100 |
commit | 89b91112b810a6b29396b8f4e91c8bde92969e0e (patch) | |
tree | fa5f07182062fad454e0696f5daa608dd0ba8920 /include | |
parent | fee66b72d296ecdd9654109c31e9dbfa4811d034 (diff) | |
download | mupdf-89b91112b810a6b29396b8f4e91c8bde92969e0e.tar.xz |
Change colorspace 'device_n' field to be a flags word.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/colorspace.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/include/mupdf/fitz/colorspace.h b/include/mupdf/fitz/colorspace.h index e07ea538..3c393caa 100644 --- a/include/mupdf/fitz/colorspace.h +++ b/include/mupdf/fitz/colorspace.h @@ -16,14 +16,6 @@ enum FZ_RI_ABSOLUTE_COLORIMETRIC, }; -enum -{ - FZ_NOT_DEVICE_N, - FZ_DEVICE_N_SPOTS_ONLY, - FZ_DEVICE_N_WITH_CMYK, - FZ_DEVICE_N_CMYK_ONLY -}; - typedef struct fz_color_params_s fz_color_params; struct fz_color_params_s @@ -79,9 +71,10 @@ int fz_colorspace_is_subtractive(fz_context *ctx, const fz_colorspace *cs); int fz_colorspace_is_device_n(fz_context *ctx, const fz_colorspace *cs); /* - fz_colorspace_device_n: Return information about device n colorants + fz_colorspace_device_n_has_only_cmyk: Return true if devicen color space + has only colorants from the cmyk set. */ -int fz_colorspace_device_n_info(fz_context *ctx, const fz_colorspace *cs); +int fz_colorspace_device_n_has_only_cmyk(fz_context *ctx, const fz_colorspace *cs); /* fz_colorspace_device_n_has_cmyk: Return true if devicen color space has cyan @@ -90,6 +83,12 @@ int fz_colorspace_device_n_info(fz_context *ctx, const fz_colorspace *cs); int fz_colorspace_device_n_has_cmyk(fz_context *ctx, const fz_colorspace *cs); /* + fz_colorspace_is_device_gray: Return true if the color space is + device gray. +*/ +int fz_colorspace_is_device_gray(fz_context *ctx, const fz_colorspace *cs); + +/* fz_device_gray: Get colorspace representing device specific gray. */ fz_colorspace *fz_device_gray(fz_context *ctx); @@ -127,7 +126,16 @@ typedef fz_colorspace *(fz_colorspace_base_fn)(const fz_colorspace *cs); typedef void (fz_colorspace_clamp_fn)(const fz_colorspace *cs, const float *src, float *dst); -fz_colorspace *fz_new_colorspace(fz_context *ctx, const char *name, int n, int is_subtractive, int is_device_n, fz_colorspace_convert_fn *to_ccs, fz_colorspace_convert_fn *from_ccs, fz_colorspace_base_fn *base, fz_colorspace_clamp_fn *clamp, fz_colorspace_destruct_fn *destruct, void *data, size_t size); +enum +{ + FZ_CS_DEVICE_GRAY = 1, + FZ_CS_DEVICE_N = 2, + FZ_CS_SUBTRACTIVE = 4, + + FZ_CS_LAST_PUBLIC_FLAG = 4 +}; + +fz_colorspace *fz_new_colorspace(fz_context *ctx, const char *name, int n, int flags, fz_colorspace_convert_fn *to_ccs, fz_colorspace_convert_fn *from_ccs, fz_colorspace_base_fn *base, fz_colorspace_clamp_fn *clamp, fz_colorspace_destruct_fn *destruct, void *data, size_t size); void fz_colorspace_name_colorant(fz_context *ctx, fz_colorspace *cs, int n, const char *name); const char *fz_colorspace_colorant(fz_context *ctx, const fz_colorspace *cs, int n); fz_colorspace *fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsigned char *lookup); |