[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] subsurfaces outside of their parents



I would like to see a feature where you could have a subsurface take a
rect that covered an area that was partially or completely outside
parent surface's rect, and any drawing done to the subsurface that was
outside of the parent surface would just be clipped/not actually done
to real pixels. As in:

s = pygame.Surface((100, 100))
sub = s.subsurface(Rect(-10, -10, 20, 20)

then (0, 0, 10, 10) of sub would be (-10, -10, 0, 0) of s, and no
pixels would actually be written.