diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-03-12 11:19:09 -0500 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-03-22 12:07:26 +0100 |
commit | cfb66cd25bbf31857b471735e5ff0f7c2aea4d3c (patch) | |
tree | 8d8d06c9e2c880611a3c8cc025d8c35fe38d59ba /source/fitz/path.c | |
parent | 3832d0c7ab87aa1f2b3a3dbebe43a37e4055d121 (diff) | |
download | mupdf-cfb66cd25bbf31857b471735e5ff0f7c2aea4d3c.tar.xz |
Rename fz_putc/puts/printf to fz_write_*.
Rename fz_write to fz_write_data.
Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*.
Be consistent in naming:
fz_write_* calls write to fz_output.
fz_append_* calls append to fz_buffer.
Update documentation.
Diffstat (limited to 'source/fitz/path.c')
-rw-r--r-- | source/fitz/path.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/fitz/path.c b/source/fitz/path.c index 8fef2a32..120d2e9e 100644 --- a/source/fitz/path.c +++ b/source/fitz/path.c @@ -1354,46 +1354,46 @@ fz_print_path(fz_context *ctx, fz_output *out, fz_path *path, int indent) uint8_t cmd = path->cmds[i++]; for (n = 0; n < indent; n++) - fz_putc(ctx, out, ' '); + fz_write_byte(ctx, out, ' '); switch (cmd) { case FZ_MOVETO: case FZ_MOVETOCLOSE: x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g m%s\n", x, y, cmd == FZ_MOVETOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "%g %g m%s\n", x, y, cmd == FZ_MOVETOCLOSE ? " z" : ""); break; case FZ_LINETO: case FZ_LINETOCLOSE: x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g l%s\n", x, y, cmd == FZ_LINETOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "%g %g l%s\n", x, y, cmd == FZ_LINETOCLOSE ? " z" : ""); break; case FZ_DEGENLINETO: case FZ_DEGENLINETOCLOSE: - fz_printf(ctx, out, "d%s\n", cmd == FZ_DEGENLINETOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "d%s\n", cmd == FZ_DEGENLINETOCLOSE ? " z" : ""); break; case FZ_HORIZTO: case FZ_HORIZTOCLOSE: x = path->coords[k++]; - fz_printf(ctx, out, "%g h%s\n", x, cmd == FZ_HORIZTOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "%g h%s\n", x, cmd == FZ_HORIZTOCLOSE ? " z" : ""); break; case FZ_VERTTOCLOSE: case FZ_VERTTO: y = path->coords[k++]; - fz_printf(ctx, out, "%g i%s\n", y, cmd == FZ_VERTTOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "%g i%s\n", y, cmd == FZ_VERTTOCLOSE ? " z" : ""); break; case FZ_CURVETOCLOSE: case FZ_CURVETO: x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g ", x, y); + fz_write_printf(ctx, out, "%g %g ", x, y); x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g ", x, y); + fz_write_printf(ctx, out, "%g %g ", x, y); x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g c%s\n", x, y, cmd == FZ_CURVETOCLOSE ? " z" : ""); + fz_write_printf(ctx, out, "%g %g c%s\n", x, y, cmd == FZ_CURVETOCLOSE ? " z" : ""); break; case FZ_CURVETOVCLOSE: case FZ_CURVETOV: @@ -1401,18 +1401,18 @@ fz_print_path(fz_context *ctx, fz_output *out, fz_path *path, int indent) case FZ_CURVETOY: x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g ", x, y); + fz_write_printf(ctx, out, "%g %g ", x, y); x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g %c%s\n", x, y, (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOV ? 'v' : 'y'), (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOYCLOSE) ? " z" : ""); + fz_write_printf(ctx, out, "%g %g %c%s\n", x, y, (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOV ? 'v' : 'y'), (cmd == FZ_CURVETOVCLOSE || cmd == FZ_CURVETOYCLOSE) ? " z" : ""); break; case FZ_RECTTO: x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g ", x, y); + fz_write_printf(ctx, out, "%g %g ", x, y); x = path->coords[k++]; y = path->coords[k++]; - fz_printf(ctx, out, "%g %g r\n", x, y); + fz_write_printf(ctx, out, "%g %g r\n", x, y); break; } } |