-
Notifications
You must be signed in to change notification settings - Fork 287
Closed
Milestone
Description
I was having this issue with Image where if I did something like Image(5,6).shift_down(1), it would cause it to return an image of size 5x5 instead of 5x6. After looking through the code, I saw that the width was being passed twice into the blit function:
micropython/source/microbit/microbitimage.cpp
Lines 324 to 328 in a92ca9b
| 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); | |
| return result; | |
| } |
It looks like self->width(), self->width() should be replaced with self->width(), self->height() on lines 325 and 326 for this to function correctly.
Metadata
Metadata
Assignees
Labels
No labels