summaryrefslogtreecommitdiff
path: root/shared-module/bitmaptools
AgeCommit message (Collapse)Author
2021-03-21Merge pull request #4454 from jepler/bitmaptools-readinto-4bitJeff Epler
Fix reading 4-bit data
2021-03-21hex may be more obviousJeff Epler
2021-03-21Fix reading 4-bit dataJeff Epler
2021-03-20Merge pull request #4432 from jepler/bitmap-dirty-improvementsJeff Epler
Bitmap dirty improvements
2021-03-19off by one error in rotozoom dirty_areaKevin Matocha
2021-03-19rotozoom: switch to using set_dirty_area + write_pixelJeff Epler
2021-03-18Merge pull request #4428 from kmatch98/bitmap-read-2Jeff Epler
Add `reverse_rows` to speedy bitmaptools.readinto function
2021-03-18displayio: Move bitmap read-only checking to displayio_bitmap_set_dirty_areaJeff Epler
This is a modest code savings, but more importantly it reduces boilerplate in bitmap-modifying routines. Callers need only ensure they call displayio_bitmap_set_dirty_area in advance of the bitmap modifications they perform. (note that this assumes that no bitmap operation can enter background tasks. If an operation COULD enter background tasks, it MUST re-dirty the area it touches when it exits, simply by a fresh call to set_dirty_area with the same area as before)
2021-03-18displayio_bitmap_set_dirty_area: rewrite in terms of displayio_areaJeff Epler
.. simplifying code in the process. For instance, now fill_region uses area routines to order and constrain its coordinates. Happily, this change also frees a modest amount of code space.
2021-03-17arrayblit: mark bitmap area as dirtyJeff Epler
2021-03-17ran pre-commit for formatting fixesKevin Matocha
2021-03-17minor formattingKevin Matocha
2021-03-17merge upstream/mainKevin Matocha
2021-03-16re-format with uncrustifyJeff Epler
2021-03-16Add reverse_rows option to bitmaptools.readintoKevin Matocha
2021-03-15add arrayblitJeff Epler
2021-03-14bitmaptools.readinto: Fix diagnostics on atmel-samd buildsJeff Epler
2021-03-14bitmaptools: Add readintoJeff Epler
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-11Move input checks to shared-module, update docstringsKevin Matocha
2021-03-10add fill_region and draw_line to bitmaptoolsKevin Matocha
2021-02-23Add bitmaptools moduleKevin Matocha