Commit Graph

9 Commits

Author SHA1 Message Date
Kevin Matocha ef91e1752c merge upstream/main 2021-03-17 09:30:51 -05:00
Jeff Epler 97b6664201 re-format with uncrustify 2021-03-16 12:20:09 -05:00
Kevin Matocha 227ac67463 Add reverse_rows option to bitmaptools.readinto 2021-03-16 10:01:12 -05:00
Jeff Epler 542fb58673 add arrayblit 2021-03-15 20:36:44 -05:00
Jeff Epler 094265cb86 bitmaptools.readinto: Fix diagnostics on atmel-samd builds 2021-03-14 15:36:20 -05:00
Jeff Epler 9133b23a37 bitmaptools: Add readinto
When reading uncompressed bitmap data directly, readinto can work
much more quickly than a Python-coded loop.

On a Raspberry Pi Pico, I benchmarked a modified version of
adafruit_bitmap_font's pcf reader which uses readinto instead of
the existing code. My test font was a 72-point file created from Arial.

This decreased the time to load all the ASCII glyphs from 4.9 seconds to
just 0.44 seconds.

While this attempts to support many pixel configurations (1/2/4/8/16/24/32
bpp; swapped words and pixels) only the single combination used by
PCF fonts was tested.
2021-03-14 13:57:46 -05:00
Kevin Matocha a9afa0d9d4 Move input checks to shared-module, update docstrings 2021-03-11 16:18:17 -06:00
Kevin Matocha 85f0f07d51 add fill_region and draw_line to bitmaptools 2021-03-10 11:37:27 -06:00
Kevin Matocha b720028642 Add bitmaptools module 2021-02-23 23:23:14 -06:00