Invert y: this is now using standard definition

pull/121/head
Graeme Winter 2021-04-10 10:42:46 +01:00
rodzic d17cd858b5
commit 9477387df7
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -88,7 +88,7 @@ picoscroll.set_pixels(image)
### show_bitmap_1d
Show a view of a bitmap stored as the 7 least significant bits of
bytes in a `bytearray`, bottom-up. Individual pixels are set to
bytes in a `bytearray`, top-down. Individual pixels are set to
`brightness` based on individual bit values, with the view defined by
the offset and the width of the scroll (i.e. 17 columns). Changes will
not be visible until `update()` is called.

Wyświetl plik

@ -115,7 +115,7 @@ mp_obj_t picoscroll_show_bitmap_1d(mp_obj_t bitmap_obj, mp_obj_t brightness_obj,
unsigned char col = values[k];
for (int y = 0; y < height; y++) {
int val = brightness * ((col >> y) & 1);
scroll->set_pixel(x, height - 1 - y, val);
scroll->set_pixel(x, y, val);
}
}
}