Merge pull request #4464 from kmatch98/transform_fix

update logic for displayio.TileGrid's transform_xy
This commit is contained in:
Scott Shawcroft 2021-03-22 15:52:23 -07:00 committed by GitHub
commit 98425c9a9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -583,7 +583,7 @@ displayio_area_t *displayio_tilegrid_get_refresh_areas(displayio_tilegrid_t *sel
}
if (self->partial_change) {
if (self->absolute_transform->transpose_xy) {
if (self->transpose_xy != self->absolute_transform->transpose_xy) {
int16_t x1 = self->dirty_area.x1;
self->dirty_area.x1 = self->absolute_transform->x + self->absolute_transform->dx * (self->y + self->dirty_area.y1);
self->dirty_area.y1 = self->absolute_transform->y + self->absolute_transform->dy * (self->x + x1);