Recurfaces

Latest version: v3.0.0

Safety actively analyzes 715032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

3.0.0

- Now expects Python 3.12 and Pygame 2.5.0
- `Recurface.surface` may now store `None` at any point during runtime, and this will be interpreted as an instruction for the recurface to render nothing to the screen
- Minor restructure of `Recurface.copy_surface()`, splitting it into a public method containing validation of `.surface` and a protected overridable method (`Recurface._copy_surface()`) in which the surface is actually copied
- Added appropriate tests

This release features various potentially breaking changes (different dependency versions, restructured `.copy_surface()` method and slightly different behaviour in handling the value of `.surface`).

2.2.0

- Added `Recurface.lineage` and `Recurface.absolute_render_position`
- Added rounding to render position before passing it to pygame, to avoid pygame flooring the float value instead
- Minor error message improvements
- Reordered properties

No breaking changes.

2.1.0

- Added `.copy_surface()`, which will allow subclasses to override this method if they wish to use a more specialised/optimised process for copying their stored surfaces
- Added `.update_surface()`, to allow a Recurface object to be manually flagged for update in the next render
(the expected external use case for this is to indicate to the Recurface object that the surface has been changed,
whenever this change is state mutation rather than assigning a new value - simply assigning a different value to `.surface`
will flag this automatically, but mutations will not)
- Reordered constructor kwargs
- Minor code style changes
- Further minor optimisation in `.render_priority`
- Various improvements to comments and docstrings

No breaking changes.

2.0.0

- Fixed bug causing `Recurface.trimmed_rects()` to trim slightly *too* many rects, resulting in visual artifacting in areas where the screen is not updated appropriately
- Added and updated tests
- Further optimisation to `Recurface.trimmed_rects()`
- `.add_update_rects()` now receives unpacked *args rather than a single `Iterable` arg
- Renamed params to make style consistent
- Updated docstrings and comments

This release features breaking changes in the form of modified method signatures as indicated above.

1.0.8

- Returned rects when calling `.render()` are now trimmed down to remove any unnecessary rects and None values, for optimisation purposes

No breaking changes.

1.0.7

- Fixed memory leak caused by repeatedly re-raising the same stored TypeError object, causing it to continually grow in size

No breaking changes.

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.