summaryrefslogtreecommitdiff
path: root/xps/xps_gradient.c
diff options
context:
space:
mode:
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;