Skip to content

Commit

Permalink
microbit: Fix image_shift so it retains image width and height.
Browse files Browse the repository at this point in the history
Fixes issue #718.
  • Loading branch information
Blockguy24 authored and dpgeorge committed Sep 6, 2021
1 parent 4cd8ad1 commit 4cdc4ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/microbit/microbitimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ STATIC void image_blit(microbit_image_obj_t *src, greyscale_t *dest, mp_int_t x,
}

greyscale_t *image_shift(microbit_image_obj_t *self, mp_int_t x, mp_int_t y) {
greyscale_t *result = greyscale_new(self->width(), self->width());
image_blit(self, result, x, y, self->width(), self->width(), 0, 0);
greyscale_t *result = greyscale_new(self->width(), self->height());
image_blit(self, result, x, y, self->width(), self->height(), 0, 0);
return result;
}

Expand Down

0 comments on commit 4cdc4ac

Please sign in to comment.