diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-11-09 14:17:00 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-11 12:11:31 +0100 |
commit | c22e6a6dc2bf6acbac955bd5fbdd896329dfd725 (patch) | |
tree | d9d84d3a6a74ed74c9d470b532097769545e8dc6 /source/fitz/shade.c | |
parent | 95b928431f233052e4bbbd1b2bf9fc705657b5a7 (diff) | |
download | mupdf-c22e6a6dc2bf6acbac955bd5fbdd896329dfd725.tar.xz |
Use fz_output instead of FILE* for most of our output needs.
Use fz_output in debug printing functions.
Use fz_output in pdfshow.
Use fz_output in fz_trace_device instead of stdout.
Use fz_output in pdf-write.c.
Rename fz_new_output_to_filename to fz_new_output_with_path.
Add seek and tell to fz_output.
Remove unused functions like fz_fprintf.
Fix typo in pdf_print_obj.
Diffstat (limited to 'source/fitz/shade.c')
-rw-r--r-- | source/fitz/shade.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/source/fitz/shade.c b/source/fitz/shade.c index f5e25639..d543b020 100644 --- a/source/fitz/shade.c +++ b/source/fitz/shade.c @@ -1086,45 +1086,43 @@ fz_bound_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_rect * return fz_transform_rect(s, &local_ctm); } -#ifndef NDEBUG void -fz_print_shade(fz_context *ctx, FILE *out, fz_shade *shade) +fz_print_shade(fz_context *ctx, fz_output *out, fz_shade *shade) { int i; - fprintf(out, "shading {\n"); + fz_printf(ctx, out, "shading {\n"); switch (shade->type) { - case FZ_FUNCTION_BASED: fprintf(out, "\ttype function_based\n"); break; - case FZ_LINEAR: fprintf(out, "\ttype linear\n"); break; - case FZ_RADIAL: fprintf(out, "\ttype radial\n"); break; - default: /* MESH */ fprintf(out, "\ttype mesh\n"); break; + case FZ_FUNCTION_BASED: fz_printf(ctx, out, "\ttype function_based\n"); break; + case FZ_LINEAR: fz_printf(ctx, out, "\ttype linear\n"); break; + case FZ_RADIAL: fz_printf(ctx, out, "\ttype radial\n"); break; + default: /* MESH */ fz_printf(ctx, out, "\ttype mesh\n"); break; } - fprintf(out, "\tbbox [%g %g %g %g]\n", + fz_printf(ctx, out, "\tbbox [%g %g %g %g]\n", shade->bbox.x0, shade->bbox.y0, shade->bbox.x1, shade->bbox.y1); - fprintf(out, "\tcolorspace %s\n", shade->colorspace->name); + fz_printf(ctx, out, "\tcolorspace %s\n", shade->colorspace->name); - fprintf(out, "\tmatrix [%g %g %g %g %g %g]\n", + fz_printf(ctx, out, "\tmatrix [%g %g %g %g %g %g]\n", shade->matrix.a, shade->matrix.b, shade->matrix.c, shade->matrix.d, shade->matrix.e, shade->matrix.f); if (shade->use_background) { - fprintf(out, "\tbackground ["); + fz_printf(ctx, out, "\tbackground ["); for (i = 0; i < shade->colorspace->n; i++) - fprintf(out, "%s%g", i == 0 ? "" : " ", shade->background[i]); - fprintf(out, "]\n"); + fz_printf(ctx, out, "%s%g", i == 0 ? "" : " ", shade->background[i]); + fz_printf(ctx, out, "]\n"); } if (shade->use_function) { - fprintf(out, "\tfunction\n"); + fz_printf(ctx, out, "\tfunction\n"); } - fprintf(out, "}\n"); + fz_printf(ctx, out, "}\n"); } -#endif |