07-13-2020, 03:14 AM
I can see a couple of things here.
Firstly you are calling the private draw method _rle2bit() rather than the documented blit() method (see https://wasp-os.readthedocs.io/en/latest...ml#drawing ). Additionally you have supplied fg, c1 and c2 arguments instead of relying on their default values.
Secondly you are blitting a full screen image at (x,y) = (20, 20). This will drawing outside the bounds of the display and that provokes an exception.
Try something simpler such as:
One reason to prefer Draw565.blit() over Draw565._rle2bit() is that the code above should work, without modification for 1-bit images as well.
Firstly you are calling the private draw method _rle2bit() rather than the documented blit() method (see https://wasp-os.readthedocs.io/en/latest...ml#drawing ). Additionally you have supplied fg, c1 and c2 arguments instead of relying on their default values.
Secondly you are blitting a full screen image at (x,y) = (20, 20). This will drawing outside the bounds of the display and that provokes an exception.
Try something simpler such as:
Code:
draw.blit(self._logo, 0, 0)
One reason to prefer Draw565.blit() over Draw565._rle2bit() is that the code above should work, without modification for 1-bit images as well.