summaryrefslogtreecommitdiff
path: root/source/tools/mudraw.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-28 15:01:39 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-28 15:15:42 +0100
commit5c41dcd3f3458f7e1562a9493b4cba0da83f4188 (patch)
tree3e94316bb611c43d04926b16e8af76397c2e14d3 /source/tools/mudraw.c
parent12aa6f724a04f1729513690a14d3a0bdc0725732 (diff)
downloadmupdf-5c41dcd3f3458f7e1562a9493b4cba0da83f4188.tar.xz
Fix inconsistency in band handling.
In an earlier commit, I changed some of the band writing functions to take the band starting offset, rather than the band number. This was done to accomodate the idea of rendering the page in bands of different heights. Sadly, it seems I didn't push this all the way through, and had different band writing functions still taking the band number. Fix all the band writing functions to be consistent.
Diffstat (limited to 'source/tools/mudraw.c')
-rw-r--r--source/tools/mudraw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index 7e4b40fb..4912bd52 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -908,11 +908,11 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in
if (output)
{
if (output_format == OUT_PGM || output_format == OUT_PPM || output_format == OUT_PNM)
- fz_write_pnm_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band, drawheight, pix->samples);
+ fz_write_pnm_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band * bandheight, drawheight, pix->samples);
else if (output_format == OUT_PAM)
- fz_write_pam_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band, drawheight, pix->samples);
+ fz_write_pam_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band * bandheight, drawheight, pix->samples);
else if (output_format == OUT_PNG)
- fz_write_png_band(ctx, out, poc, pix->stride, band, drawheight, pix->samples);
+ fz_write_png_band(ctx, out, poc, pix->stride, band * bandheight, drawheight, pix->samples);
else if (output_format == OUT_PWG)
fz_write_pixmap_as_pwg(ctx, out, pix, NULL);
else if (output_format == OUT_PCL)
@@ -924,10 +924,10 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in
bit = NULL;
}
else
- fz_write_color_pcl_band(ctx, out, pccoc, pix->w, totalheight, pix->n, pix->stride, band, drawheight, pix->samples);
+ fz_write_color_pcl_band(ctx, out, pccoc, pix->w, totalheight, pix->n, pix->stride, band * bandheight, drawheight, pix->samples);
}
else if (output_format == OUT_PS)
- fz_write_ps_band(ctx, out, psoc, pix->w, totalheight, pix->n, pix->stride, band, drawheight, pix->samples);
+ fz_write_ps_band(ctx, out, psoc, pix->w, totalheight, pix->n, pix->stride, band * bandheight, drawheight, pix->samples);
else if (output_format == OUT_PBM)
{
fz_write_pbm_band(ctx, out, bit);