bitmaptools dither: Fix off-by-one error filling row data
This commit is contained in:
parent
6191696232
commit
9af76a2f03
|
@ -761,13 +761,13 @@ void common_hal_bitmaptools_dither(displayio_bitmap_t *dest_bitmap, displayio_bi
|
|||
rows[1] = rows[2];
|
||||
rows[2] = tmp;
|
||||
|
||||
fill_row(source_bitmap, swap, rows[2], y + 2, info->mx);
|
||||
|
||||
y++;
|
||||
if (y == height) {
|
||||
break;
|
||||
}
|
||||
|
||||
fill_row(source_bitmap, swap, rows[2], y + 2, info->mx);
|
||||
|
||||
// Serpentine dither. Going right-to-left...
|
||||
for (int x = width; x--;) {
|
||||
int16_t pixel_in = rows[0][x] + err;
|
||||
|
@ -790,7 +790,7 @@ void common_hal_bitmaptools_dither(displayio_bitmap_t *dest_bitmap, displayio_bi
|
|||
rows[1] = rows[2];
|
||||
rows[2] = tmp;
|
||||
|
||||
fill_row(source_bitmap, swap, rows[2], y + 2, info->mx);
|
||||
fill_row(source_bitmap, swap, rows[2], y + 3, info->mx);
|
||||
}
|
||||
|
||||
displayio_area_t a = { 0, 0, width, height, NULL };
|
||||
|
|
Loading…
Reference in New Issue