Skip to content

Fix blitting from negative position

Created by: RandomShaper

The various Image.blit_* methods don't handle well the case where any or both of the source start coordinates are negative.

imagen

In words: the expected behavior is as if the source pixels from outside the image were defaulted to transparent, but what the current implementation does is constraining the source rectangle to the source image bounds and then blitting that rectangle to the destination position.


This code is donated by AdPodnet.

Merge request reports