diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-06-28 15:01:39 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-28 15:15:42 +0100 |
commit | 5c41dcd3f3458f7e1562a9493b4cba0da83f4188 (patch) | |
tree | 3e94316bb611c43d04926b16e8af76397c2e14d3 /source/fitz/output-pcl.c | |
parent | 12aa6f724a04f1729513690a14d3a0bdc0725732 (diff) | |
download | mupdf-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/fitz/output-pcl.c')
-rw-r--r-- | source/fitz/output-pcl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/fitz/output-pcl.c b/source/fitz/output-pcl.c index 6d0a24a6..c0858299 100644 --- a/source/fitz/output-pcl.c +++ b/source/fitz/output-pcl.c @@ -777,7 +777,7 @@ fz_color_pcl_output_context *fz_write_color_pcl_header(fz_context *ctx, fz_outpu return pcoc; } -void fz_write_color_pcl_band(fz_context *ctx, fz_output *out, fz_color_pcl_output_context *pcoc, int w, int h, int n, int stride, int band, int bandheight, unsigned char *sp) +void fz_write_color_pcl_band(fz_context *ctx, fz_output *out, fz_color_pcl_output_context *pcoc, int w, int h, int n, int stride, int band_start, int bandheight, unsigned char *sp) { int y, ss, ds, seed_valid, fill; unsigned char *prev; @@ -796,9 +796,8 @@ void fz_write_color_pcl_band(fz_context *ctx, fz_output *out, fz_color_pcl_outpu comp = pcoc->compbuf; seed_valid = pcoc->seed_valid; - band *= bandheight; - if (band+bandheight >= h) - bandheight = h - band; + if (band_start+bandheight >= h) + bandheight = h - band_start; y = 0; while (y < bandheight) |