pygame-ce 2.2.0
- Demo of transform grayscale, invert, and blur routines. Invert and blur new in this release.
# if you're switching over from pygame/pygame,
# remove it first to avoid conflicting namespace
pip uninstall pygame
pip install pygame-ce==2.2.0
Welcome to the newest release of pygame-ce! We're excited to share the last month's worth of merged
enhancements, bugfixes, and cleanups.
What's Changed
Enhancements
-
@Emc2356 and @yunline added
pygame.FRect
, a version ofpygame.Rect
that supports floating point values! TheFRect
class supports the whole pygame.Rect API. This is useful so that one can use floating point values for position, while still being a Rect. #1944, #2046 -
@Starbuck5 accelerated many types of alpha blitting using AVX2 instructions, achieving a 30-300% performance gain when blitting with transparent Surfaces (on supported systems). #2019
-
@robertpfeiffer made it possible to use VSYNC in a normal (non-SCALED) pygame display setup, also added
is_vsync
,get_current_refresh_rate
,get_desktop_refresh_rates
functions. #1874 -
@ScriptLineStudios added
pygame.transform.invert
, which inverts the RGB color of each pixel in a Surface. #1911 -
@yunline added
pygame.transform.box_blur
andpygame.transform.gaussian_blur
. #1836, #2026, #2028 -
@Starbuck5 and @ankith26 added a new module!
pygame.system
is for miscellaneous system information. Right now it hasget_pref_path
to create a persistent data directory andget_pref_locales
to get system locale information. #1897 -
@MyreMylar accelerated the BLEND_PREMULTIPLIED blend mode using AVX2 instructions (2-6x faster). #5, #2005
-
@oddbookworm added a new copy-paste API in the
scrap
module, which is easier to use and more portable. #1984 -
@novialriptide added a
Font.name
attribute, to get the proper name of the font. #1971 -
@avaxar implemented swizzling for
pygame.Color
--I.e. color.rgb, color.bgr, color.garb
. #1935, #1994 -
@avaxar updated several object representations to better conform to Python standards. For example,
pygame.Rect(1,2,3,4)
is now represented asRect(1, 2, 3, 4)
instead of<rect(1, 2, 3, 4)>
. #1995 -
@yunline added full support for keyword arguments in the
image
module. #2010
Bugfixes
-
@robertpfeiffer and @oddbookworm ensured that circles will draw properly even if way off screen. #2003, #2032
-
@yunline fixed a possible segfault in
Surface.convert()
on 8-bit surfaces. #2007 -
@Temmie3754 fixed issues where
pygame.draw.line
could be cut off across Surfaces. #1998
Deprecations, Potential Breaking Changes, and Removals
-
Legacy
pygame.scrap
functions are now deprecated. Contributed by @oddbookworm. #1984 -
pygame.fastevent
has been removed. Contributed by @gresm. #1966 -
pygame.mixer
now raises a FileNotFoundError when the sound isn't found on the filesystem. Contributed by @Temmie3754. #2001
Docs, Examples, and Types
-
@oddbookworm and @Temmie3754 improved the documentation content. #1992, #1996, #2024
-
@yunline added type hints for draw_triangle and draw_quad in sdl2_video. #2018
Cleanups and Robustness
-
@Starbuck5, @itzpr3d4t0r, and @simplyrohan contributed refactors in the codebase. #1993, #2002, #2011, #2013
-
@zoldalma999 and @MyreMylar submitted some internal changes for controller and sprite. #1903, #1942
-
@simplyrohan made sure the version checking of SDL_ttf versions is correct. #1991
Operations
-
@oddbookworm added venv to gitignore. #1985
-
@yunline removed a now unnecessary GH actions workaround. #2012
New Contributors
- @simplyrohan made their first contribution in #1991
Governance
Since last release, we're proud to welcome three new members of the project!
Congratulations to @yunline, @itzpr3d4t0r, and @dr0id.
We've also elected (among the contributors) a group of three contributors to the "steering council" -- responsible for releases and for resolving debates. The current steering council is @MyreMylar, @ankith26, and @Starbuck5. See https://github.com/pygame-community/pygame-ce/wiki/The-Steering-Council.
Full Changelog: 2.1.4...2.2.0