summaryrefslogtreecommitdiff
path: root/xps/xps_gradient.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-05-16 22:29:27 +0200
committerRobin Watts <robin.watts@artifex.com>2013-05-16 23:47:14 +0100
commit93bd1ff05bf315ed11b305d32eb510bd9a9a7e92 (patch)
tree10c2d846ed1193624a5119853bbc2ef9651e197c /xps/xps_gradient.c
parent558ad511446cfa1d70891d9e7c9fb1ba942d3d9a (diff)
downloadmupdf-93bd1ff05bf315ed11b305d32eb510bd9a9a7e92.tar.xz
Add colorspace context.
To prepare for color management, we have to make the device colorspaces per-context and able to be overridden by users.
Diffstat (limited to 'xps/xps_gradient.c')
-rw-r--r--xps/xps_gradient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xps/xps_gradient.c b/xps/xps_gradient.c
index 04438df8..3b4a2b88 100644
--- a/xps/xps_gradient.c
+++ b/xps/xps_gradient.c
@@ -60,7 +60,7 @@ xps_parse_gradient_stops(xps_document *doc, char *base_uri, fz_xml *node,
xps_parse_color(doc, base_uri, color, &colorspace, sample);
- fz_convert_color(doc->ctx, fz_device_rgb, rgb, colorspace, sample + 1);
+ fz_convert_color(doc->ctx, fz_device_rgb(doc->ctx), rgb, colorspace, sample + 1);
stops[count].r = rgb[0];
stops[count].g = rgb[1];
@@ -213,7 +213,7 @@ xps_draw_one_radial_gradient(xps_document *doc, const fz_matrix *ctm,
/* TODO: this (and the stuff in pdf_shade) should move to res_shade.c */
shade = fz_malloc_struct(doc->ctx, fz_shade);
FZ_INIT_STORABLE(shade, 1, fz_free_shade_imp);
- shade->colorspace = fz_device_rgb;
+ shade->colorspace = fz_device_rgb(doc->ctx);
shade->bbox = fz_infinite_rect;
shade->matrix = fz_identity;
shade->use_background = 0;
@@ -251,7 +251,7 @@ xps_draw_one_linear_gradient(xps_document *doc, const fz_matrix *ctm,
/* TODO: this (and the stuff in pdf_shade) should move to res_shade.c */
shade = fz_malloc_struct(doc->ctx, fz_shade);
FZ_INIT_STORABLE(shade, 1, fz_free_shade_imp);
- shade->colorspace = fz_device_rgb;
+ shade->colorspace = fz_device_rgb(doc->ctx);
shade->bbox = fz_infinite_rect;
shade->matrix = fz_identity;
shade->use_background = 0;