Especially on lower end boards it seems advantageous to be able to draw smaller images in part of the screen only without having to refresh the whole screen.
I would like to suggest to add two new arguments to the method for specifying the origin
def draw(self, image, x0=0, y0=0):
to drop the if imwidth != self.width or imheight != self.height: check and to adapt the call to _block so that the image's size is passed in instead of the screen size.
The
image
method currently only allows to redraw the whole screen.Especially on lower end boards it seems advantageous to be able to draw smaller images in part of the screen only without having to refresh the whole screen.
I would like to suggest to add two new arguments to the method for specifying the origin
to drop the
if imwidth != self.width or imheight != self.height:
check and to adapt the call to_block
so that the image's size is passed in instead of the screen size.Instead of removing the size check, one could also replace it with a check to ensure that the image is not bigger than the screen size.
Happy to submit a pull request if this makes sense.