diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
commit | f783c31203be2dbd7a28c89557014f97a367bec9 (patch) | |
tree | 8faea8d21fa44b99226af34a13f33c6a0e1f7182 /xps/xps_gradient.c | |
parent | aa7668835afffd5a2a496a60ed6edb672f5af1a7 (diff) | |
download | mupdf-f783c31203be2dbd7a28c89557014f97a367bec9.tar.xz |
Add warning context.
Diffstat (limited to 'xps/xps_gradient.c')
-rw-r--r-- | xps/xps_gradient.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xps/xps_gradient.c b/xps/xps_gradient.c index 4dcf1ef8..19424f9b 100644 --- a/xps/xps_gradient.c +++ b/xps/xps_gradient.c @@ -61,7 +61,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, xps_parse_color(ctx, base_uri, color, &colorspace, sample); - fz_convert_color(colorspace, sample + 1, fz_device_rgb, rgb); + fz_convert_color(ctx->ctx, colorspace, sample + 1, fz_device_rgb, rgb); stops[count].r = rgb[0]; stops[count].g = rgb[1]; @@ -76,7 +76,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, if (count == 0) { - fz_warn("gradient brush has no gradient stops"); + fz_warn(ctx->ctx, "gradient brush has no gradient stops"); stops[0].offset = 0; stops[0].r = 0; stops[0].g = 0; @@ -91,7 +91,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, } if (count == maxcount) - fz_warn("gradient brush exceeded maximum number of gradient stops"); + fz_warn(ctx->ctx, "gradient brush exceeded maximum number of gradient stops"); /* Postprocess to make sure the range of offsets is 0.0 to 1.0 */ @@ -425,14 +425,14 @@ xps_parse_gradient_brush(xps_context *ctx, fz_matrix ctm, fz_rect area, ctm = fz_concat(transform, ctm); if (!stop_tag) { - fz_warn("missing gradient stops tag"); + fz_warn(ctx->ctx, "missing gradient stops tag"); return; } stop_count = xps_parse_gradient_stops(ctx, base_uri, stop_tag, stop_list, MAX_STOPS); if (stop_count == 0) { - fz_warn("no gradient stops found"); + fz_warn(ctx->ctx, "no gradient stops found"); return; } |