summaryrefslogtreecommitdiff
path: root/shared-module/displayio/area.h
AgeCommit message (Collapse)Author
2021-03-25move to displayio_area_union and away from _expandKevin Matocha
2021-03-18displayio: area: add displayio_area_canonJeff Epler
This routine will be used to simplify code that deals with ranges of bitmap coordinates.
2021-03-18displayio: area: add displayo_area_copy_coords, displayio_area_emptyJeff Epler
.. and simplify the implmentation of displayio_area_union This _slightly_ changes the behavior of displayio_area_union: Formerly, if one of the areas was empty, its coordinates were still used in the min/max calculations. Now, if one of the areas is empty, the result gets the other area's coords In particular, taking the union of the empty area with coords (0,0,0,0) with the non-empty area (x1,y1,x2,y2) would give the area (0,0,x2,y2) before, and (x1,y1,x2,y2) after the change.
2021-03-15run code formatting scriptmicroDev
2021-03-04Be cognizant of null transform for .transpose_xyDan Halbert
2019-06-12Add partial display update support.Scott Shawcroft
Different operations to the display tree have different costs. Be aware of these costs when optimizing your code. * Changing tiles indices in a TileGrid will update an area covering them all. * Changing a palette will refresh every object that references it. * Moving a TileGrid will update both where it was and where it moved to. * Adding something to a Group will refresh each individual area it covers. * Removing things from a Group will refresh one area that covers all previous locations. (Not separate areas like add.) * Setting a new top level Group will refresh the entire display. Only TileGrid moves are optimized for overlap. All other overlaps cause sending of duplicate pixels. This also adds flip_x, flip_y and transpose_xy to TileGrid. They change the direction of the pixels but not the location. Fixes #1169. Fixes #1705. Fixes #1923.
2019-05-22Make point 2 in areas exclusive and simplify full_coverage.Scott Shawcroft
2019-05-21Rework the pixel computation to use areasScott Shawcroft
This changes the displayio pixel computation from per-pixel to per-area. This is precursor work to updating portions of the screen (#1169). It should provide mild speedups because bounds checks are done once per area rather than once per pixel. Filling by area also allows TileGrid to maintain a row-associative fill pattern even when the display's refresh is orthogonal to it.