Optimize Dirty Rects
Optimize Dirty Rects - 1.0
Jason Marshall (jmm0)
The script optimize_dirty_rects.py contains a function of the same name. This function will accept a list (or other iterable) of objects of the pygame.Rect type. All overlapping areas will be removed, and the function will return a list of Rect objects.
Do not pass in Rects that shouldn't be resized (e.g. Sprite.rect). Instead, pass in the Rects that are returned by a blit to the screen surface.
This code is free (MIT License).
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.