summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-colorspace.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2016-09-28 22:25:16 -0400
committerRobin Watts <robin.watts@artifex.com>2016-10-06 11:54:10 +0100
commit80d6490e6d54f822de6d36219ce08e6a8ad33137 (patch)
treeb3b5bf787b1454e82275be0b452c4edc8ce432de /source/pdf/pdf-colorspace.c
parent994770e2010e21cd8f90bacc34b9fae8a6350a40 (diff)
downloadmupdf-80d6490e6d54f822de6d36219ce08e6a8ad33137.tar.xz
Hide internals of fz_colorspace
The implementation does not need to be in the public API.
Diffstat (limited to 'source/pdf/pdf-colorspace.c')
-rw-r--r--source/pdf/pdf-colorspace.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/pdf/pdf-colorspace.c b/source/pdf/pdf-colorspace.c
index b9cb26e9..05c54b31 100644
--- a/source/pdf/pdf-colorspace.c
+++ b/source/pdf/pdf-colorspace.c
@@ -1,5 +1,7 @@
#include "mupdf/pdf.h"
+#include "../fitz/colorspace-impl.h"
+
/* ICCBased */
static fz_colorspace *
@@ -106,11 +108,8 @@ load_separation(fz_context *ctx, pdf_document *doc, pdf_obj *array)
sep->base = base;
sep->tint = tint;
- cs = fz_new_colorspace(ctx, n == 1 ? "Separation" : "DeviceN", n);
- cs->to_rgb = separation_to_rgb;
- cs->free_data = free_separation;
- cs->data = sep;
- cs->size += sizeof(struct separation) + (base ? base->size : 0) + fz_function_size(ctx, tint);
+ cs = fz_new_colorspace(ctx, n == 1 ? "Separation" : "DeviceN", n, separation_to_rgb, NULL, free_separation, sep,
+ sizeof(struct separation) + (base ? base->size : 0) + fz_function_size(ctx, tint));
}
fz_catch(ctx)
{
@@ -126,7 +125,7 @@ load_separation(fz_context *ctx, pdf_document *doc, pdf_obj *array)
int
pdf_is_tint_colorspace(fz_context *ctx, fz_colorspace *cs)
{
- return cs && cs->to_rgb == separation_to_rgb;
+ return fz_colorspace_is(ctx, cs, separation_to_rgb);
}
/* Indexed */